protected RelNode makeRel( RelOptCluster cluster, RelTraitSet traits, RelDataType rowType, RelNode child, RexProgram program) { return new CalcRel( cluster, traits, child, rowType, program, Collections.<RelCollation>emptyList()); }
protected RelNode makeRel( RelOptCluster cluster, RelTraitSet traits, RelDataType rowType, RelNode child, RexProgram program) { return new CalcRel( cluster, traits, child, rowType, program, Collections.<RelCollation>emptyList()); }
@Override public CalcRelBase copy( RelTraitSet traitSet, RelNode child, RexProgram program, List<RelCollation> collationList) { return new CalcRel( getCluster(), traitSet, child, program.getOutputRowType(), program, collationList); }
public RelNode copy(RelTraitSet traitSet, List<RelNode> inputs) { return new CalcRel( getCluster(), traitSet, sole(inputs), rowType, program.copy(), getCollationList()); }
outputTypeList, outputNameList)); return new CalcRel( rel.getCluster(), rel.getTraitSet(),
public void onMatch(RelOptRuleCall call) { final ProjectRel project = call.rel(0); final RelNode child = project.getChild(); final RelDataType rowType = project.getRowType(); final RexProgram program = RexProgram.create( child.getRowType(), project.getProjects(), null, project.getRowType(), project.getCluster().getRexBuilder()); final CalcRel calc = new CalcRel( project.getCluster(), project.getTraitSet(), child, rowType, program, Collections.<RelCollation>emptyList()); call.transformTo(calc); } }
public void onMatch(RelOptRuleCall call) { final ProjectRel project = call.rel(0); final RelNode child = project.getChild(); final RelDataType rowType = project.getRowType(); final RexProgram program = RexProgram.create( child.getRowType(), project.getProjects(), null, project.getRowType(), project.getCluster().getRexBuilder()); final CalcRel calc = new CalcRel( project.getCluster(), project.getTraitSet(), child, rowType, program, ImmutableList.<RelCollation>of()); call.transformTo(calc); } }
public void onMatch(RelOptRuleCall call) { final FilterRel filter = call.rel(0); final RelNode rel = filter.getChild(); // Create a program containing a filter. final RexBuilder rexBuilder = filter.getCluster().getRexBuilder(); final RelDataType inputRowType = rel.getRowType(); final RexProgramBuilder programBuilder = new RexProgramBuilder(inputRowType, rexBuilder); programBuilder.addIdentity(); programBuilder.addCondition(filter.getCondition()); final RexProgram program = programBuilder.getProgram(); final CalcRel calc = new CalcRel( filter.getCluster(), filter.getTraitSet(), rel, inputRowType, program, ImmutableList.<RelCollation>of()); call.transformTo(calc); } }
public void onMatch(RelOptRuleCall call) { final FilterRel filter = call.rel(0); final RelNode rel = filter.getChild(); // Create a program containing a filter. final RexBuilder rexBuilder = filter.getCluster().getRexBuilder(); final RelDataType inputRowType = rel.getRowType(); final RexProgramBuilder programBuilder = new RexProgramBuilder(inputRowType, rexBuilder); programBuilder.addIdentity(); if (filter.getCondition() != null) { programBuilder.addCondition(filter.getCondition()); } final RexProgram program = programBuilder.getProgram(); final CalcRel calc = new CalcRel( filter.getCluster(), filter.getTraitSet(), rel, inputRowType, program, Collections.<RelCollation>emptyList()); call.transformTo(calc); } }
new CalcRel( calc.getCluster(), calc.getTraitSet(),
new CalcRel( cluster, rel.getTraitSet(),
new CalcRel( cluster, rel.getTraitSet(),
new CalcRel( project.getCluster(), project.getTraitSet(),
new CalcRel( calcRel.getCluster(), calcRel.getTraitSet(),
rexBuilder); final CalcRel newCalc = new CalcRel( calc.getCluster(), calc.getTraitSet(),
new CalcRel( calcRel.getCluster(), calcRel.getTraitSet(),
topCalc.getCluster().getRexBuilder()); final CalcRel newCalc = new CalcRel( bottomCalc.getCluster(), bottomCalc.getTraitSet(),
rexBuilder); final CalcRel newCalc = new CalcRel( calc.getCluster(), calc.getTraitSet(),