public List<Expression> translateList( List<RexNode> operandList, RexImpTable.NullAs nullAs) { return translateList(operandList, nullAs, EnumUtils.internalTypes(operandList)); }
public List<Expression> translateList( List<RexNode> operandList, RexImpTable.NullAs nullAs) { return translateList(operandList, nullAs, EnumUtils.internalTypes(operandList)); }
/** * Translates the list of {@code RexNode}, using the default output types. * This might be suboptimal in terms of additional box-unbox when you use * the translation later. * If you know the java class that will be used to store the results, use * {@link org.apache.calcite.adapter.enumerable.RexToLixTranslator#translateList(java.util.List, java.util.List)} * version. * * @param operandList list of RexNodes to translate * * @return translated expressions */ public List<Expression> translateList(List<? extends RexNode> operandList) { return translateList(operandList, EnumUtils.internalTypes(operandList)); }
/** * Translates the list of {@code RexNode}, using the default output types. * This might be suboptimal in terms of additional box-unbox when you use * the translation later. * If you know the java class that will be used to store the results, use * {@link org.apache.calcite.adapter.enumerable.RexToLixTranslator#translateList(java.util.List, java.util.List)} * version. * * @param operandList list of RexNodes to translate * * @return translated expressions */ public List<Expression> translateList(List<? extends RexNode> operandList) { return translateList(operandList, EnumUtils.internalTypes(operandList)); }
public final List<Expression> arguments() { return rowTranslator().translateList(rexArguments()); } }
public final List<Expression> arguments() { return rowTranslator().translateList(rexArguments()); } }
public final List<Expression> arguments() { return rowTranslator().translateList(rexArguments()); } }
public final List<Expression> arguments() { return rowTranslator().translateList(rexArguments()); } }
public final List<Expression> arguments(Expression rowIndex) { return rowTranslator(rowIndex).translateList(rexArguments()); }
public final List<Expression> arguments(Expression rowIndex) { return rowTranslator(rowIndex).translateList(rexArguments()); }
private static Expression implementCall( final RexToLixTranslator translator, RexCall call, NotNullImplementor implementor, final NullAs nullAs) { List<Expression> translatedOperands = translator.translateList(call.getOperands()); // Make sure the operands marked not null in the translator have all been // handled for nulls before being passed to the NotNullImplementor. if (nullAs == NullAs.NOT_POSSIBLE) { List<Expression> nullHandled = translatedOperands; for (int i = 0; i < translatedOperands.size(); i++) { RexNode arg = call.getOperands().get(i); Expression e = translatedOperands.get(i); if (!translator.isNullable(arg)) { if (nullHandled == translatedOperands) { nullHandled = new ArrayList<>(translatedOperands.subList(0, i)); } nullHandled.add(translator.handleNull(e, nullAs)); } else if (nullHandled != translatedOperands) { nullHandled.add(e); } } translatedOperands = nullHandled; } Expression result = implementor.implement(translator, call, translatedOperands); return translator.handleNull(result, nullAs); }
private static Expression implementCall( final RexToLixTranslator translator, RexCall call, NotNullImplementor implementor, final NullAs nullAs) { List<Expression> translatedOperands = translator.translateList(call.getOperands()); // Make sure the operands marked not null in the translator have all been // handled for nulls before being passed to the NotNullImplementor. if (nullAs == NullAs.NOT_POSSIBLE) { List<Expression> nullHandled = translatedOperands; for (int i = 0; i < translatedOperands.size(); i++) { RexNode arg = call.getOperands().get(i); Expression e = translatedOperands.get(i); if (!translator.isNullable(arg)) { if (nullHandled == translatedOperands) { nullHandled = new ArrayList<>(translatedOperands.subList(0, i)); } nullHandled.add(translator.handleNull(e, nullAs)); } else if (nullHandled != translatedOperands) { nullHandled.add(e); } } translatedOperands = nullHandled; } Expression result = implementor.implement(translator, call, translatedOperands); return translator.handleNull(result, nullAs); }
public Expression implement(RexToLixTranslator translator, RexCall call, NullAs nullAs) { switch (nullAs) { case NULL: return Expressions.call(BuiltInMethod.NOT.method, translator.translateList(call.getOperands(), nullAs)); default: return Expressions.not( translator.translate(call.getOperands().get(0), negate(nullAs))); } }
public Expression implement(RexToLixTranslator translator, RexCall call, NullAs nullAs) { switch (nullAs) { case NULL: return Expressions.call(BuiltInMethod.NOT.method, translator.translateList(call.getOperands(), nullAs)); default: return Expressions.not( translator.translate(call.getOperands().get(0), negate(nullAs))); } }
null, null) .setCorrelates(correlates) .translateList(program.getProjectList(), storageTypes);
null, null) .setCorrelates(correlates) .translateList(program.getProjectList(), storageTypes);
@Override public CallImplementor getImplementor() { return (translator, call, nullAs) -> { Method lookupMethod = Types.lookupMethod(Smalls.AllTypesFunction.class, "arrayAppendFun", List.class, Integer.class); return Expressions.call(lookupMethod, translator.translateList(call.getOperands(), nullAs)); }; } }
@Override public CallImplementor getImplementor() { return (translator, call, nullAs) -> { Method lookupMethod = Types.lookupMethod(Smalls.AllTypesFunction.class, "arrayAppendFun", List.class, Integer.class); return Expressions.call(lookupMethod, translator.translateList(call.getOperands(), nullAs)); }; } }
final List<Expression> conditions = new ArrayList<>(); conditions.addAll( translator.translateList(args, RexImpTable.NullAs.IS_NOT_NULL)); if (add.rexFilterArgument() != null) { conditions.add(
final List<Expression> conditions = new ArrayList<>(); conditions.addAll( translator.translateList(args, RexImpTable.NullAs.IS_NOT_NULL)); if (add.rexFilterArgument() != null) { conditions.add(