RexCall convertedOriginalValuesExpr = (RexCall) new RexNodeConverter(this.cluster, inputRel.getRowType(), inputPosMap, 0, false).convert(valuesExpr); RelDataType valuesRowType = ((ArraySqlType) convertedOriginalValuesExpr.getType()).getComponentType(); List<RexNode> newStructExprs = new ArrayList<>(); for (RexNode structExpr : convertedOriginalValuesExpr.getOperands()) {
private RelDataType copyArrayType(RelDataType type, boolean nullable) { ArraySqlType at = (ArraySqlType) type; RelDataType elementType = copyType(at.getComponentType()); return new ArraySqlType(elementType, nullable); }
private RelDataType copyArrayType(RelDataType type, boolean nullable) { ArraySqlType at = (ArraySqlType) type; RelDataType elementType = copyType(at.getComponentType()); return new ArraySqlType(elementType, nullable); }
public int compareTypePrecedence(RelDataType type1, RelDataType type2) { if (!containsType(type1)) { throw new IllegalArgumentException("must contain type: " + type1); } if (!containsType(type2)) { throw new IllegalArgumentException("must contain type: " + type2); } return getComponentType().getPrecedenceList() .compareTypePrecedence(type1.getComponentType(), type2.getComponentType()); } };
public int compareTypePrecedence(RelDataType type1, RelDataType type2) { if (!containsType(type1)) { throw new IllegalArgumentException("must contain type: " + type1); } if (!containsType(type2)) { throw new IllegalArgumentException("must contain type: " + type2); } return getComponentType().getPrecedenceList() .compareTypePrecedence(type1.getComponentType(), type2.getComponentType()); } };
public boolean containsType(RelDataType type) { return type.getSqlTypeName() == getSqlTypeName() && type.getComponentType() != null && getComponentType().getPrecedenceList().containsType( type.getComponentType()); }
public boolean containsType(RelDataType type) { return type.getSqlTypeName() == getSqlTypeName() && type.getComponentType() != null && getComponentType().getPrecedenceList().containsType( type.getComponentType()); }
for (Object entry : listValue) { operands.add( makeLiteral(entry, arrayType.getComponentType(), allowCast));
for (Object entry : listValue) { operands.add( makeLiteral(entry, arrayType.getComponentType(), allowCast));