new RexToLixTranslator.InputGetterImpl( ImmutableList.of( Pair.<Expression, PhysType>of(
typeFactory, builder2, new RexToLixTranslator.InputGetterImpl( Collections.singletonList( Pair.of(input, result.physType))), physType, DataContext.ROOT, new RexToLixTranslator.InputGetterImpl( Collections.singletonList( Pair.of(input, result.physType))),
typeFactory, builder2, new RexToLixTranslator.InputGetterImpl( Collections.singletonList( Pair.of(input, result.physType))), physType, DataContext.ROOT, new RexToLixTranslator.InputGetterImpl( Collections.singletonList( Pair.of(input, result.physType))),
final RexToLixTranslator.InputGetter inputGetter = new RexToLixTranslator.InputGetterImpl(ImmutableList.of( Pair.of( Expressions.variable(Object[].class, "inputValues"),
final RexToLixTranslator.InputGetter inputGetter = new RexToLixTranslator.InputGetterImpl(ImmutableList.of( Pair.of( Expressions.variable(Object[].class, "inputValues"),
new RexToLixTranslator.InputGetterImpl( ImmutableList.of( Pair.of(
new RexToLixTranslator.InputGetterImpl( ImmutableList.of( Pair.of(
new RexToLixTranslator.InputGetterImpl( ImmutableList.of( Pair.<Expression, PhysType>of(
Expression predicate(EnumerableRelImplementor implementor, BlockBuilder builder, PhysType leftPhysType, PhysType rightPhysType, RexNode condition) { final ParameterExpression left_ = Expressions.parameter(leftPhysType.getJavaRowType(), "left"); final ParameterExpression right_ = Expressions.parameter(rightPhysType.getJavaRowType(), "right"); final RexProgramBuilder program = new RexProgramBuilder( implementor.getTypeFactory().builder() .addAll(left.getRowType().getFieldList()) .addAll(right.getRowType().getFieldList()) .build(), getCluster().getRexBuilder()); program.addCondition(condition); builder.add( Expressions.return_(null, RexToLixTranslator.translateCondition(program.getProgram(), implementor.getTypeFactory(), builder, new RexToLixTranslator.InputGetterImpl( ImmutableList.of(Pair.of((Expression) left_, leftPhysType), Pair.of((Expression) right_, rightPhysType))), implementor.allCorrelateVariables, implementor.getConformance()))); return Expressions.lambda(Predicate2.class, builder.toBlock(), left_, right_); } }
Expression predicate(EnumerableRelImplementor implementor, BlockBuilder builder, PhysType leftPhysType, PhysType rightPhysType, RexNode condition) { final ParameterExpression left_ = Expressions.parameter(leftPhysType.getJavaRowType(), "left"); final ParameterExpression right_ = Expressions.parameter(rightPhysType.getJavaRowType(), "right"); final RexProgramBuilder program = new RexProgramBuilder( implementor.getTypeFactory().builder() .addAll(left.getRowType().getFieldList()) .addAll(right.getRowType().getFieldList()) .build(), getCluster().getRexBuilder()); program.addCondition(condition); builder.add( Expressions.return_(null, RexToLixTranslator.translateCondition(program.getProgram(), implementor.getTypeFactory(), builder, new RexToLixTranslator.InputGetterImpl( ImmutableList.of(Pair.of((Expression) left_, leftPhysType), Pair.of((Expression) right_, rightPhysType))), implementor.allCorrelateVariables, implementor.getConformance()))); return Expressions.lambda(Predicate2.class, builder.toBlock(), left_, right_); } }
public RexToLixTranslator rowTranslator() { final SqlConformance conformance = SqlConformanceEnum.DEFAULT; // TODO: get this from implementor return RexToLixTranslator.forAggregation(typeFactory, currentBlock(), new RexToLixTranslator.InputGetterImpl( Collections.singletonList( Pair.of((Expression) inParameter, inputPhysType))), conformance) .setNullable(currentNullables()); } };
public RexToLixTranslator rowTranslator() { return RexToLixTranslator.forAggregation(typeFactory, currentBlock(), new RexToLixTranslator.InputGetterImpl( Collections.singletonList( Pair.of((Expression) inParameter, inputPhysType))), implementor.getConformance()) .setNullable(currentNullables()); } };
public RexToLixTranslator rowTranslator() { return RexToLixTranslator.forAggregation(typeFactory, currentBlock(), new RexToLixTranslator.InputGetterImpl( Collections.singletonList( Pair.of(inParameter, inputPhysType))), implementor.getConformance()) .setNullable(currentNullables()); } };
public RexToLixTranslator rowTranslator() { final SqlConformance conformance = SqlConformanceEnum.DEFAULT; // TODO: get this from implementor return RexToLixTranslator.forAggregation(typeFactory, currentBlock(), new RexToLixTranslator.InputGetterImpl( Collections.singletonList( Pair.of((Expression) inParameter, inputPhysType))), conformance) .setNullable(currentNullables()); } };