public RelDataType getRowTypeSansSystemColumns() { return getRowType(); }
public void setType(RelDataType type) { this.type = type; this.rowType = convertToStruct(type); }
rowType == null, "Namespace.rowType must be null before validate has been called"); RelDataType type = validateImpl(); Util.permAssert( type != null, true); setType(type); } finally { status = SqlValidatorImpl.Status.VALID;
rowType == null, "Namespace.rowType must be null before validate has been called"); rowType = validateImpl(); Util.permAssert( rowType != null,
protected RelDataType convertToStruct(RelDataType type) { // "MULTISET [<expr>, ...]" needs to be wrapped in a record if // <expr> has a scalar type. // For example, "MULTISET [8, 9]" has type // "RECORD(INTEGER EXPR$0 NOT NULL) NOT NULL MULTISET NOT NULL". final RelDataType componentType = type.getComponentType(); if (componentType == null || componentType.isStruct()) { return type; } final RelDataTypeFactory typeFactory = validator.getTypeFactory(); final RelDataType structType = typeFactory.builder() .add(validator.deriveAlias(getNode(), 0), componentType) .build(); final RelDataType collectionType; switch (type.getSqlTypeName()) { case ARRAY: collectionType = typeFactory.createArrayType(structType, -1); break; case MULTISET: collectionType = typeFactory.createMultisetType(structType, -1); break; default: throw new AssertionError(type); } return typeFactory.createTypeWithNullability(collectionType, type.isNullable()); } }
public RelDataType getRowTypeSansSystemColumns() { return getRowType(); }
public SqlValidatorNamespace lookupChild(String name) { return validator.lookupFieldNamespace( getRowType(), name); }
public boolean fieldExists(String name) { final RelDataType rowType = getRowType(); return validator.catalogReader.field(rowType, name) != null; }
public boolean fieldExists(String name) { final RelDataType rowType = getRowType(); final RelDataType dataType = SqlValidatorUtil.lookupFieldType(rowType, name); return dataType != null; }
public SqlValidatorNamespace lookupChild(String name) { return validator.lookupFieldNamespace( getRowType(), name); }
public RelDataType getType() { Util.discard(getRowType()); return type; }