public RelDataType getFieldType(int index) { return projectRefs.get(index).getType(); } });
public RelDataType getFieldType(int index) { return projectRefList.get(index).getType(); } });
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) { 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); if (operand instanceof RexInputRef) { return operand; } assert operand instanceof RexLocalRef; final RexLocalRef ref = (RexLocalRef) operand; return new RexInputRef(ref.getIndex(), ref.getType()); } };
@Override public RexNode visitLocalRef(RexLocalRef localRef) { return new RexInputRef(localRef.getIndex(), localRef.getType()); } };
public RexNode visitInputRef(RexInputRef input) { // This expression refers to the Nth project column. Lookup that // column and find out what common sub-expression IT refers to. final int index = input.getIndex(); final RexLocalRef local = projectRefList.get(index); assert RelOptUtil.eq( "type1", local.getType(), "type2", input.getType(), true); return local; }
public Boolean visitLocalRef(RexLocalRef localRef) { final int index = localRef.getIndex(); if ((index < 0) || (index >= internalExprTypeList.size())) { assert !fail; ++failCount; return false; } if (!RelOptUtil.eq( "type1", localRef.getType(), "type2", internalExprTypeList.get(index), fail)) { assert !fail; ++failCount; return false; } return true; } }
public Boolean visitLocalRef(RexLocalRef localRef) { final int index = localRef.getIndex(); if ((index < 0) || (index >= internalExprTypeList.size())) { assert !fail; ++failCount; return false; } if (!RelOptUtil.eq( "type1", localRef.getType(), "type2", internalExprTypeList.get(index), fail)) { assert !fail; ++failCount; return false; } return true; } }
public RexNode visitLocalRef(RexLocalRef local) { // A reference to a local variable becomes a reference to an input // if the local was computed at a previous level. final int localIndex = local.getIndex(); final int exprLevel = exprLevels[localIndex]; if (exprLevel < level) { if (allExprs[localIndex] instanceof RexLiteral) { // Expression is to be inlined. Use the original expression. return allExprs[localIndex]; } int inputIndex = indexOf(localIndex, inputExprOrdinals); assert inputIndex >= 0; return new RexLocalRef( inputIndex, local.getType()); } else { // It's a reference to what was a local expression at the // previous level, and was then projected. final int exprIndex = exprInverseOrdinals[localIndex]; return new RexLocalRef( exprIndex, local.getType()); } } }
public RexNode get(int index) { final RexLocalRef ref = program.getProjectList().get(index); return new RexInputRef(ref.getIndex(), ref.getType()); }
public RexNode visitLocalRef(RexLocalRef local) { // A reference to a local variable becomes a reference to an input // if the local was computed at a previous level. final int localIndex = local.getIndex(); final int exprLevel = exprLevels[localIndex]; if (exprLevel < level) { if (allExprs[localIndex] instanceof RexLiteral) { // Expression is to be inlined. Use the original expression. return allExprs[localIndex]; } int inputIndex = indexOf(localIndex, inputExprOrdinals); assert inputIndex >= 0; return new RexLocalRef( inputIndex, local.getType()); } else { // It's a reference to what was a local expression at the // previous level, and was then projected. final int exprIndex = exprInverseOrdinals[localIndex]; return new RexLocalRef( exprIndex, local.getType()); } } }
public RexNode visitInputRef(RexInputRef input) { // This expression refers to the Nth project column. Lookup that // column and find out what common sub-expression IT refers to. final int index = input.getIndex(); final RexLocalRef local = projectRefList.get(index); assert RelOptUtil.eq( "type1", local.getType(), "type2", input.getType(), true); return local; }
public RexNode visitLocalRef(RexLocalRef local) { final int index = local.getIndex(); int target = permutation.getTarget(index); return new RexLocalRef( target, local.getType()); } }
public RexNode visitLocalRef(RexLocalRef local) { final int index = local.getIndex(); int target = permutation.getTarget(index); return new RexLocalRef( target, local.getType()); } }
exprList.get(index).getType(), "ref type", local.getType(), true);
exprList.get(index).getType(), "ref type", local.getType(), true);
new RexLocalRef( getNewForOldInput(conditionRef.getIndex()), conditionRef.getType()));
new RexLocalRef( getNewForOldInput(conditionRef.getIndex()), conditionRef.getType()));