public class AliasNamespace extends AbstractNamespace
AS t(c1, c2, ...)
clause.
A namespace is necessary only if there is a column list, in order to
re-map column names; a relation AS t
clause just uses the same
namespace as relation
.
Modifier and Type | Field and Description |
---|---|
protected SqlCall |
call |
enclosingNode, rowType, type, validator
Modifier | Constructor and Description |
---|---|
protected |
AliasNamespace(SqlValidatorImpl validator,
SqlCall call,
SqlNode enclosingNode)
Creates an AliasNamespace.
|
Modifier and Type | Method and Description |
---|---|
SqlNode |
getNode()
Returns the parse tree node at the root of this namespace.
|
private java.lang.String |
getString(RelDataType rowType) |
java.lang.String |
translate(java.lang.String name) |
protected RelDataType |
validateImpl(RelDataType targetRowType)
Validates this scope and returns the type of the records it returns.
|
convertToStruct, fieldExists, getEnclosingNode, getMonotonicExprs, getMonotonicity, getRowType, getRowTypeSansSystemColumns, getTable, getType, getValidator, isWrapperFor, lookupChild, makeNullable, resolve, setType, supportsModality, toStruct, unwrap, validate
protected final SqlCall call
protected AliasNamespace(SqlValidatorImpl validator, SqlCall call, SqlNode enclosingNode)
validator
- Validatorcall
- Call to AS operatorenclosingNode
- Enclosing nodeprotected 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'.private java.lang.String getString(RelDataType rowType)
public SqlNode getNode()
SqlValidatorNamespace
TableNamespace
public java.lang.String translate(java.lang.String name)
translate
in class AbstractNamespace
Copyright © 2012–2019 The Apache Software Foundation. All rights reserved.