public RexNode rexFilterArgument() { return agg.call.filterArg < 0 ? null : RexInputRef.of(agg.call.filterArg, inputPhysType.getRowType()); }
public RexNode rexFilterArgument() { return agg.call.filterArg < 0 ? null : RexInputRef.of(agg.call.filterArg, inputPhysType.getRowType()); }
public RexNode rexFilterArgument() { return agg.call.filterArg < 0 ? null : RexInputRef.of(agg.call.filterArg, inputPhysType.getRowType()); }
public RexNode rexFilterArgument() { return agg.call.filterArg < 0 ? null : RexInputRef.of(agg.call.filterArg, inputPhysType.getRowType()); }
public List<RexNode> rexArguments() { List<RexNode> args = new ArrayList<>(); for (int index : agg.call.getArgList()) { args.add(RexInputRef.of(index, inputPhysType.getRowType())); } return args; }
public List<RexNode> rexArguments() { List<RexNode> args = new ArrayList<>(); for (int index : agg.call.getArgList()) { args.add(RexInputRef.of(index, inputPhysType.getRowType())); } return args; }
public List<RexNode> rexArguments() { List<RelDataTypeField> inputTypes = inputPhysType.getRowType().getFieldList(); List<RexNode> args = new ArrayList<>(); for (int index : agg.call.getArgList()) { args.add(RexInputRef.of(index, inputTypes)); } return args; }
public List<RexNode> rexArguments() { List<RelDataTypeField> inputTypes = inputPhysType.getRowType().getFieldList(); List<RexNode> args = new ArrayList<>(); for (int index : agg.call.getArgList()) { args.add(RexInputRef.of(index, inputTypes)); } return args; }
public Expression field(BlockBuilder list, int index, Type storageType) { int offset = 0; for (Pair<Expression, PhysType> input : inputs) { final PhysType physType = input.right; int fieldCount = physType.getRowType().getFieldCount(); if (index >= offset + fieldCount) { offset += fieldCount; continue; } final Expression left = list.append("current", input.left); return physType.fieldReference(left, index - offset, storageType); } throw new IllegalArgumentException("Unable to find field #" + index); } }
public Expression field(BlockBuilder list, int index, Type storageType) { int offset = 0; for (Pair<Expression, PhysType> input : inputs) { final PhysType physType = input.right; int fieldCount = physType.getRowType().getFieldCount(); if (index >= offset + fieldCount) { offset += fieldCount; continue; } final Expression left = list.append("current", input.left); return physType.fieldReference(left, index - offset, storageType); } throw new IllegalArgumentException("Unable to find field #" + index); } }
return EnumUtils.fieldRowTypes(result.physType.getRowType(), constants, agg.call.getArgList());
final int outputFieldCount = physType.getRowType().getFieldCount(); for (Ord<PhysType> ord : Ord.zip(inputPhysTypes)) { final PhysType inputPhysType = final int fieldCount = inputPhysType.getRowType().getFieldCount(); for (int i = 0; i < fieldCount; i++) { Expression expression =
List<Type> storageTypes = null; if (outputPhysType != null) { final RelDataType rowType = outputPhysType.getRowType(); storageTypes = new ArrayList<>(rowType.getFieldCount()); for (int i = 0; i < rowType.getFieldCount(); i++) {
List<Type> storageTypes = null; if (outputPhysType != null) { final RelDataType rowType = outputPhysType.getRowType(); storageTypes = new ArrayList<>(rowType.getFieldCount()); for (int i = 0; i < rowType.getFieldCount(); i++) {
final int outputFieldCount = physType.getRowType().getFieldCount(); for (Ord<PhysType> ord : Ord.zip(inputPhysTypes)) { final PhysType inputPhysType = final int fieldCount = inputPhysType.getRowType().getFieldCount(); for (int i = 0; i < fieldCount; i++) { Expression expression =
private Expression fieldExpression(ParameterExpression row_, int i, PhysType physType, JavaRowFormat format) { final Expression e = format.field(row_, i, null, physType.getJavaFieldType(i)); final RelDataType relFieldType = physType.getRowType().getFieldList().get(i).getType(); switch (relFieldType.getSqlTypeName()) { case ARRAY: case MULTISET: // We can't represent a multiset or array as a List<Employee>, because // the consumer does not know the element type. // The standard element type is List. // We need to convert to a List<List>. final JavaTypeFactory typeFactory = (JavaTypeFactory) getCluster().getTypeFactory(); final PhysType elementPhysType = PhysTypeImpl.of( typeFactory, relFieldType.getComponentType(), JavaRowFormat.CUSTOM); final MethodCallExpression e2 = Expressions.call(BuiltInMethod.AS_ENUMERABLE2.method, e); final RelDataType dummyType = this.rowType; final Expression e3 = elementPhysType.convertTo(e2, PhysTypeImpl.of(typeFactory, dummyType, JavaRowFormat.LIST)); return Expressions.call(e3, BuiltInMethod.ENUMERABLE_TO_LIST.method); default: return e; } }
private Expression fieldExpression(ParameterExpression row_, int i, PhysType physType, JavaRowFormat format) { final Expression e = format.field(row_, i, null, physType.getJavaFieldType(i)); final RelDataType relFieldType = physType.getRowType().getFieldList().get(i).getType(); switch (relFieldType.getSqlTypeName()) { case ARRAY: case MULTISET: // We can't represent a multiset or array as a List<Employee>, because // the consumer does not know the element type. // The standard element type is List. // We need to convert to a List<List>. final JavaTypeFactory typeFactory = (JavaTypeFactory) getCluster().getTypeFactory(); final PhysType elementPhysType = PhysTypeImpl.of( typeFactory, relFieldType.getComponentType(), JavaRowFormat.CUSTOM); final MethodCallExpression e2 = Expressions.call(BuiltInMethod.AS_ENUMERABLE2.method, e); final RelDataType dummyType = this.rowType; final Expression e3 = elementPhysType.convertTo(e2, PhysTypeImpl.of(typeFactory, dummyType, JavaRowFormat.LIST)); return Expressions.call(e3, BuiltInMethod.ENUMERABLE_TO_LIST.method); default: return e; } }
fieldCollations.get(0).getFieldIndex(); RelDataType keyType = physType.getRowType().getFieldList().get(orderKey).getType(); Type desiredKeyType = translator.typeFactory.getJavaClass(keyType); if (bound.getOffset() == null) {
fieldCollations.get(0).getFieldIndex(); RelDataType keyType = physType.getRowType().getFieldList().get(orderKey).getType(); Type desiredKeyType = translator.typeFactory.getJavaClass(keyType); if (bound.getOffset() == null) {
final Primitive primitive = Primitive.ofBoxOr(physType.fieldClass(i)); final RelDataType fieldType = physType.getRowType().getFieldList().get(i).getType(); final List<Expression> dateTimeArgs = new ArrayList<>(); dateTimeArgs.add(Expressions.constant(i + 1));