Java Code Examples for org.apache.calcite.rex.RexLocalRef#getIndex()
The following examples show how to use
org.apache.calcite.rex.RexLocalRef#getIndex() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SqlImplementor.java From Bats with Apache License 2.0 | 5 votes |
public static boolean isStar(RexProgram program) { int i = 0; for (RexLocalRef ref : program.getProjectList()) { if (ref.getIndex() != i++) { return false; } } return i == program.getInputRowType().getFieldCount(); }
Example 2
Source File: SqlImplementor.java From dremio-oss with Apache License 2.0 | 5 votes |
public static boolean isStar(RexProgram program) { int i = 0; for (RexLocalRef ref : program.getProjectList()) { if (ref.getIndex() != i++) { return false; } } return i == program.getInputRowType().getFieldCount(); }
Example 3
Source File: JoinCalcTransposeRule.java From quark with Apache License 2.0 | 5 votes |
private static boolean isStar(RexProgram program) { int i = 0; for (RexLocalRef ref : program.getProjectList()) { if (ref.getIndex() != i++) { return false; } } return i == program.getInputRowType().getFieldCount(); }
Example 4
Source File: RelToSqlConverter.java From quark with Apache License 2.0 | 5 votes |
private static boolean isStar(RexProgram program) { int i = 0; for (RexLocalRef ref : program.getProjectList()) { if (ref.getIndex() != i++) { return false; } } return i == program.getInputRowType().getFieldCount(); }
Example 5
Source File: SqlImplementor.java From calcite with Apache License 2.0 | 5 votes |
public static boolean isStar(RexProgram program) { int i = 0; for (RexLocalRef ref : program.getProjectList()) { if (ref.getIndex() != i++) { return false; } } return i == program.getInputRowType().getFieldCount(); }
Example 6
Source File: CalcRelSplitter.java From Bats with Apache License 2.0 | 4 votes |
@Override public Void visitLocalRef(RexLocalRef localRef) { int inputLevel = exprLevels[localRef.getIndex()]; level = Math.max(level, inputLevel); return null; }
Example 7
Source File: CalcRelSplitter.java From Bats with Apache License 2.0 | 4 votes |
@Override public Void visitLocalRef(RexLocalRef ref) { final int index = ref.getIndex(); maxUsingLevelOrdinals[index] = Math.max(maxUsingLevelOrdinals[index], currentLevel); return null; }
Example 8
Source File: CalcRelSplitter.java From calcite with Apache License 2.0 | 4 votes |
public Void visitLocalRef(RexLocalRef localRef) { int inputLevel = exprLevels[localRef.getIndex()]; level = Math.max(level, inputLevel); return null; }
Example 9
Source File: CalcRelSplitter.java From calcite with Apache License 2.0 | 4 votes |
public Void visitLocalRef(RexLocalRef ref) { final int index = ref.getIndex(); maxUsingLevelOrdinals[index] = Math.max(maxUsingLevelOrdinals[index], currentLevel); return null; }