public class AliasNamespace extends Object
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
.
Compared to Calcite we forward the original StructKind
and nullability.
Modifier and Type | Field and Description |
---|---|
protected org.apache.calcite.sql.SqlCall |
call |
protected org.apache.calcite.sql.SqlNode |
enclosingNode |
protected org.apache.calcite.rel.type.RelDataType |
rowType |
protected org.apache.calcite.rel.type.RelDataType |
type |
protected SqlValidatorImpl |
validator |
Modifier | Constructor and Description |
---|---|
protected |
AliasNamespace(SqlValidatorImpl validator,
org.apache.calcite.sql.SqlCall call,
org.apache.calcite.sql.SqlNode enclosingNode)
Creates an AliasNamespace.
|
Modifier and Type | Method and Description |
---|---|
protected org.apache.calcite.rel.type.RelDataType |
convertToStruct(org.apache.calcite.rel.type.RelDataType arg0) |
boolean |
fieldExists(String arg0) |
org.apache.calcite.sql.SqlNode |
getEnclosingNode() |
List<org.apache.calcite.util.Pair<org.apache.calcite.sql.SqlNode,org.apache.calcite.sql.validate.SqlMonotonicity>> |
getMonotonicExprs() |
org.apache.calcite.sql.validate.SqlMonotonicity |
getMonotonicity(String arg0) |
org.apache.calcite.sql.SqlNode |
getNode() |
org.apache.calcite.rel.type.RelDataType |
getRowType() |
org.apache.calcite.rel.type.RelDataType |
getRowTypeSansSystemColumns() |
org.apache.calcite.sql.validate.SqlValidatorTable |
getTable() |
org.apache.calcite.rel.type.RelDataType |
getType() |
org.apache.calcite.sql.validate.SqlValidator |
getValidator() |
boolean |
isWrapperFor(Class<?> arg0) |
org.apache.calcite.sql.validate.SqlValidatorNamespace |
lookupChild(String arg0) |
void |
makeNullable() |
org.apache.calcite.sql.validate.SqlValidatorNamespace |
resolve() |
void |
setType(org.apache.calcite.rel.type.RelDataType arg0) |
boolean |
supportsModality(org.apache.calcite.sql.validate.SqlModality arg0) |
protected org.apache.calcite.rel.type.RelDataType |
toStruct(org.apache.calcite.rel.type.RelDataType arg0,
org.apache.calcite.sql.SqlNode arg1) |
String |
translate(String name) |
<T> T |
unwrap(Class<T> arg0) |
void |
validate(org.apache.calcite.rel.type.RelDataType arg0) |
protected org.apache.calcite.rel.type.RelDataType |
validateImpl(org.apache.calcite.rel.type.RelDataType targetRowType) |
protected final org.apache.calcite.sql.SqlCall call
protected final SqlValidatorImpl validator
protected org.apache.calcite.rel.type.RelDataType rowType
protected org.apache.calcite.rel.type.RelDataType type
protected final org.apache.calcite.sql.SqlNode enclosingNode
protected AliasNamespace(SqlValidatorImpl validator, org.apache.calcite.sql.SqlCall call, org.apache.calcite.sql.SqlNode enclosingNode)
validator
- Validatorcall
- Call to AS operatorenclosingNode
- Enclosing nodeprotected org.apache.calcite.rel.type.RelDataType validateImpl(org.apache.calcite.rel.type.RelDataType targetRowType)
public org.apache.calcite.sql.SqlNode getNode()
public org.apache.calcite.sql.validate.SqlValidator getValidator()
getValidator
in interface org.apache.calcite.sql.validate.SqlValidatorNamespace
public final void validate(org.apache.calcite.rel.type.RelDataType arg0)
validate
in interface org.apache.calcite.sql.validate.SqlValidatorNamespace
public org.apache.calcite.rel.type.RelDataType getRowType()
getRowType
in interface org.apache.calcite.sql.validate.SqlValidatorNamespace
public org.apache.calcite.rel.type.RelDataType getRowTypeSansSystemColumns()
getRowTypeSansSystemColumns
in interface org.apache.calcite.sql.validate.SqlValidatorNamespace
public org.apache.calcite.rel.type.RelDataType getType()
getType
in interface org.apache.calcite.sql.validate.SqlValidatorNamespace
public void setType(org.apache.calcite.rel.type.RelDataType arg0)
setType
in interface org.apache.calcite.sql.validate.SqlValidatorNamespace
public org.apache.calcite.sql.SqlNode getEnclosingNode()
getEnclosingNode
in interface org.apache.calcite.sql.validate.SqlValidatorNamespace
public org.apache.calcite.sql.validate.SqlValidatorTable getTable()
getTable
in interface org.apache.calcite.sql.validate.SqlValidatorNamespace
public org.apache.calcite.sql.validate.SqlValidatorNamespace lookupChild(String arg0)
lookupChild
in interface org.apache.calcite.sql.validate.SqlValidatorNamespace
public boolean fieldExists(String arg0)
fieldExists
in interface org.apache.calcite.sql.validate.SqlValidatorNamespace
public List<org.apache.calcite.util.Pair<org.apache.calcite.sql.SqlNode,org.apache.calcite.sql.validate.SqlMonotonicity>> getMonotonicExprs()
getMonotonicExprs
in interface org.apache.calcite.sql.validate.SqlValidatorNamespace
public org.apache.calcite.sql.validate.SqlMonotonicity getMonotonicity(String arg0)
getMonotonicity
in interface org.apache.calcite.sql.validate.SqlValidatorNamespace
public void makeNullable()
makeNullable
in interface org.apache.calcite.sql.validate.SqlValidatorNamespace
public org.apache.calcite.sql.validate.SqlValidatorNamespace resolve()
resolve
in interface org.apache.calcite.sql.validate.SqlValidatorNamespace
public boolean supportsModality(org.apache.calcite.sql.validate.SqlModality arg0)
supportsModality
in interface org.apache.calcite.sql.validate.SqlValidatorNamespace
public <T> T unwrap(Class<T> arg0)
unwrap
in interface org.apache.calcite.sql.validate.SqlValidatorNamespace
public boolean isWrapperFor(Class<?> arg0)
isWrapperFor
in interface org.apache.calcite.sql.validate.SqlValidatorNamespace
protected org.apache.calcite.rel.type.RelDataType convertToStruct(org.apache.calcite.rel.type.RelDataType arg0)
protected org.apache.calcite.rel.type.RelDataType toStruct(org.apache.calcite.rel.type.RelDataType arg0, org.apache.calcite.sql.SqlNode arg1)
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.