class TableNamespace extends AbstractNamespace
Modifier and Type | Field and Description |
---|---|
com.google.common.collect.ImmutableList<RelDataTypeField> |
extendedFields |
private SqlValidatorTable |
table |
enclosingNode, rowType, type, validator
Modifier | Constructor and Description |
---|---|
(package private) |
TableNamespace(SqlValidatorImpl validator,
SqlValidatorTable table) |
private |
TableNamespace(SqlValidatorImpl validator,
SqlValidatorTable table,
java.util.List<RelDataTypeField> fields)
Creates a TableNamespace.
|
Modifier and Type | Method and Description |
---|---|
private void |
checkExtendedColumnTypes(SqlNodeList extendList)
Ensures that extended columns that have the same name as a base column also
have the same data-type.
|
TableNamespace |
extend(SqlNodeList extendList)
Creates a TableNamespace based on the same table as this one, but with
extended fields.
|
private RelDataType |
getBaseRowType()
Gets the data-type of all columns in a table (for a view table: including
columns of the underlying table)
|
SqlMonotonicity |
getMonotonicity(java.lang.String columnName)
Returns whether and how a given column is sorted.
|
SqlNode |
getNode()
Returns the parse tree node at the root of this namespace.
|
SqlValidatorTable |
getTable()
Returns the underlying table, or null if there is none.
|
protected RelDataType |
validateImpl(RelDataType targetRowType)
Validates this scope and returns the type of the records it returns.
|
convertToStruct, fieldExists, getEnclosingNode, getMonotonicExprs, getRowType, getRowTypeSansSystemColumns, getType, getValidator, isWrapperFor, lookupChild, makeNullable, resolve, setType, supportsModality, toStruct, translate, unwrap, validate
private final SqlValidatorTable table
public final com.google.common.collect.ImmutableList<RelDataTypeField> extendedFields
private TableNamespace(SqlValidatorImpl validator, SqlValidatorTable table, java.util.List<RelDataTypeField> fields)
TableNamespace(SqlValidatorImpl validator, SqlValidatorTable table)
protected RelDataType validateImpl(RelDataType targetRowType)
AbstractNamespace
AbstractNamespace.validate(org.apache.calcite.rel.type.RelDataType)
, which uses the
AbstractNamespace.status
field to protect against cycles.validateImpl
in class AbstractNamespace
targetRowType
- Desired row type, must not be null, may be the data
type 'unknown'.public SqlNode getNode()
SqlValidatorNamespace
TableNamespace
public SqlValidatorTable getTable()
SqlValidatorNamespace
getTable
in interface SqlValidatorNamespace
getTable
in class AbstractNamespace
public SqlMonotonicity getMonotonicity(java.lang.String columnName)
SqlValidatorNamespace
getMonotonicity
in interface SqlValidatorNamespace
getMonotonicity
in class AbstractNamespace
public TableNamespace extend(SqlNodeList extendList)
Extended fields are "hidden" or undeclared fields that may nevertheless be present if you ask for them. Phoenix uses them, for instance, to access rarely used fields in the underlying HBase table.
private RelDataType getBaseRowType()
private void checkExtendedColumnTypes(SqlNodeList extendList)
Copyright © 2012–2019 The Apache Software Foundation. All rights reserved.