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,
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(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, validateprivate final SqlValidatorTable table
public final com.google.common.collect.ImmutableList<RelDataTypeField> extendedFields
private TableNamespace(SqlValidatorImpl validator, SqlValidatorTable table, List<RelDataTypeField> fields)
TableNamespace(SqlValidatorImpl validator, SqlValidatorTable table)
protected RelDataType validateImpl(RelDataType targetRowType)
AbstractNamespaceAbstractNamespace.validate(org.apache.calcite.rel.type.RelDataType), which uses the
AbstractNamespace.status field to protect against cycles.validateImpl in class AbstractNamespacetargetRowType - Desired row type, must not be null, may be the data
type 'unknown'.public SqlNode getNode()
SqlValidatorNamespaceTableNamespacepublic SqlValidatorTable getTable()
SqlValidatorNamespacegetTable in interface SqlValidatorNamespacegetTable in class AbstractNamespacepublic SqlMonotonicity getMonotonicity(String columnName)
SqlValidatorNamespacegetMonotonicity in interface SqlValidatorNamespacegetMonotonicity in class AbstractNamespacepublic 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–2018 The Apache Software Foundation. All rights reserved.