public Void visitLocalRef(RexLocalRef ref) { final int index = ref.getIndex(); maxUsingLevelOrdinals[index] = Math.max(maxUsingLevelOrdinals[index], currentLevel); return null; } }
public Void visitLocalRef(RexLocalRef localRef) { int inputLevel = exprLevels[localRef.getIndex()]; level = Math.max(level, inputLevel); return null; }
public Void visitLocalRef(RexLocalRef ref) { final int index = ref.getIndex(); maxUsingLevelOrdinals[index] = Math.max(maxUsingLevelOrdinals[index], currentLevel); return null; } }
public RexNode visitLocalRef(RexLocalRef localRef) { return newRefs.get(localRef.getIndex()); } }
public RexNode visitLocalRef(RexLocalRef local) { // Convert a local ref into the common-subexpression it references. final int index = local.getIndex(); return localExprList.get(index).accept(this); } }
public RexNode visitLocalRef(RexLocalRef local) { // Convert a local ref into the common-subexpression it references. final int index = local.getIndex(); return localExprList.get(index).accept(this); } }
public Void visitLocalRef(RexLocalRef localRef) { for (Integer target : targets) { graph.addEdge(localRef.getIndex(), target); } return null; } }
public RexNode visitLocalRef(RexLocalRef local) { // Convert a local ref into the common-subexpression it references. final int index = local.getIndex(); return localExprList.get(index).accept(this); } }
public RexNode visitLocalRef(RexLocalRef localRef) { RexNode tree = getExprList().get(localRef.getIndex()); return tree.accept(this); } }
public RexNode visitLocalRef(RexLocalRef localRef) { final int index = localRef.getIndex(); if (index < inputFieldCount) { // Reference to input field. return localRef; } return new RexLocalRef( flattenedAggCallList.size() + index, localRef.getType()); } };
public RexNode get(int index) { final RexNode operand = operands.get(index); assert operand instanceof RexLocalRef; final RexLocalRef ref = (RexLocalRef) operand; return new RexInputRef(ref.getIndex(), ref.getType()); } };
public RexNode visitLocalRef(RexLocalRef localRef) { RexNode tree = getExprList().get(localRef.getIndex()); return tree.accept(this); } }
public RexNode get(int index) { final RexNode operand = operands.get(index); if (operand instanceof RexInputRef) { return operand; } assert operand instanceof RexLocalRef; final RexLocalRef ref = (RexLocalRef) operand; return new RexInputRef(ref.getIndex(), ref.getType()); } };
public Void visitLocalRef(RexLocalRef inputRef) { super.visitLocalRef(inputRef); if (inputRef.getIndex() >= limit) { throw new IllegalForwardRefException(); } return null; }
public Void visitLocalRef(RexLocalRef inputRef) { super.visitLocalRef(inputRef); if (inputRef.getIndex() >= limit) { throw new IllegalForwardRefException(); } return null; }
@Override public RexNode visitLocalRef(RexLocalRef localRef) { return new RexInputRef(localRef.getIndex(), localRef.getType()); } };
public RelFieldCollation get(int index) { final RexFieldCollation collation = collations.get(index); return new RelFieldCollation( ((RexLocalRef) collation.left).getIndex(), collation.getDirection(), collation.getNullDirection()); }
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(); } }
public RexNode visitLocalRef(RexLocalRef local) { final int index = local.getIndex(); int target = permutation.getTarget(index); return new RexLocalRef( target, local.getType()); } }
private static boolean hasFunctions( RexProgram program ) { List<RexLocalRef> projects = program.getProjectList(); RelDataType inputRowType = program.getInputRowType(); int fieldCount = inputRowType.getFieldCount(); for( RexLocalRef project : projects ) { if( !program.isConstant( project ) && project.getIndex() >= fieldCount ) return true; } return false; }