public class IdentifierNamespace extends AbstractNamespace
identifier.| Modifier and Type | Field and Description |
|---|---|
SqlNodeList |
extendList |
private SqlIdentifier |
id |
private List<Pair<SqlNode,SqlMonotonicity>> |
monotonicExprs
List of monotonic expressions.
|
private SqlValidatorScope |
parentScope |
private SqlValidatorNamespace |
resolvedNamespace
The underlying namespace.
|
enclosingNode, rowType, type, validator| Constructor and Description |
|---|
IdentifierNamespace(SqlValidatorImpl validator,
SqlIdentifier id,
SqlNodeList extendList,
SqlNode enclosingNode,
SqlValidatorScope parentScope)
Creates an IdentifierNamespace.
|
IdentifierNamespace(SqlValidatorImpl validator,
SqlNode node,
SqlNode enclosingNode,
SqlValidatorScope parentScope) |
| Modifier and Type | Method and Description |
|---|---|
SqlIdentifier |
getId() |
List<Pair<SqlNode,SqlMonotonicity>> |
getMonotonicExprs()
Returns a list of expressions which are monotonic in this namespace.
|
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.
|
SqlValidatorNamespace |
resolve()
If this namespace resolves to another namespace, returns that namespace,
following links to the end of the chain.
|
private SqlValidatorNamespace |
resolveImpl(SqlIdentifier id) |
protected static Pair<SqlIdentifier,SqlNodeList> |
split(SqlNode node) |
boolean |
supportsModality(SqlModality modality)
Returns whether this namespace is capable of giving results of the desired
modality.
|
RelDataType |
validateImpl(RelDataType targetRowType)
Validates this scope and returns the type of the records it returns.
|
convertToStruct, fieldExists, getEnclosingNode, getRowType, getRowTypeSansSystemColumns, getType, getValidator, isWrapperFor, lookupChild, makeNullable, setType, toStruct, translate, unwrap, validateprivate final SqlIdentifier id
private final SqlValidatorScope parentScope
public final SqlNodeList extendList
private SqlValidatorNamespace resolvedNamespace
TableNamespace.
Set on validate.private List<Pair<SqlNode,SqlMonotonicity>> monotonicExprs
IdentifierNamespace(SqlValidatorImpl validator, SqlIdentifier id, @Nullable SqlNodeList extendList, SqlNode enclosingNode, SqlValidatorScope parentScope)
validator - Validatorid - Identifier node (or "identifier EXTEND column-list")extendList - Extension columns, or nullenclosingNode - Enclosing nodeparentScope - Parent scope which this namespace turns to in order toIdentifierNamespace(SqlValidatorImpl validator, SqlNode node, SqlNode enclosingNode, SqlValidatorScope parentScope)
protected static Pair<SqlIdentifier,SqlNodeList> split(SqlNode node)
private SqlValidatorNamespace resolveImpl(SqlIdentifier id)
public 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 SqlIdentifier getId()
public SqlNode getNode()
SqlValidatorNamespaceTableNamespacepublic SqlValidatorNamespace resolve()
SqlValidatorNamespaceA WITH) clause defines table names that resolve to queries
(the body of the with-item). An IdentifierNamespace typically
resolves to a TableNamespace.
You must not call this method before SqlValidatorNamespace.validate(RelDataType) has
completed.
resolve in interface SqlValidatorNamespaceresolve in class AbstractNamespacepublic SqlValidatorTable getTable()
SqlValidatorNamespacegetTable in interface SqlValidatorNamespacegetTable in class AbstractNamespacepublic List<Pair<SqlNode,SqlMonotonicity>> getMonotonicExprs()
SqlValidatorNamespaceSqlIdentifier called "TIMESTAMP".getMonotonicExprs in interface SqlValidatorNamespacegetMonotonicExprs in class AbstractNamespacepublic SqlMonotonicity getMonotonicity(String columnName)
SqlValidatorNamespacegetMonotonicity in interface SqlValidatorNamespacegetMonotonicity in class AbstractNamespacepublic boolean supportsModality(SqlModality modality)
SqlValidatorNamespacetrue means streaming, false means relational.supportsModality in interface SqlValidatorNamespacesupportsModality in class AbstractNamespacemodality - ModalityCopyright © 2012–2018 The Apache Software Foundation. All rights reserved.