Package org.apache.calcite.sql.validate
Class ParameterNamespace
- java.lang.Object
-
- org.apache.calcite.sql.validate.AbstractNamespace
-
- org.apache.calcite.sql.validate.ParameterNamespace
-
- All Implemented Interfaces:
SqlValidatorNamespace
class ParameterNamespace extends AbstractNamespace
Namespace representing the type of a dynamic parameter.- See Also:
ParameterScope
-
-
Field Summary
Fields Modifier and Type Field Description private RelDataType
type
-
Fields inherited from class org.apache.calcite.sql.validate.AbstractNamespace
enclosingNode, rowType, validator
-
-
Constructor Summary
Constructors Constructor Description ParameterNamespace(SqlValidatorImpl validator, RelDataType type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SqlNode
getNode()
Returns the parse tree node at the root of this namespace.RelDataType
getRowType()
Returns the row type of this namespace, which comprises a list of names and types of the output columns.RelDataType
validateImpl(RelDataType targetRowType)
Validates this scope and returns the type of the records it returns.-
Methods inherited from class org.apache.calcite.sql.validate.AbstractNamespace
convertToStruct, fieldExists, getEnclosingNode, getMonotonicExprs, getMonotonicity, getRowTypeSansSystemColumns, getTable, getType, getValidator, isWrapperFor, lookupChild, makeNullable, resolve, setType, supportsModality, toStruct, translate, unwrap, validate
-
-
-
-
Field Detail
-
type
private final RelDataType type
-
-
Constructor Detail
-
ParameterNamespace
ParameterNamespace(SqlValidatorImpl validator, RelDataType type)
-
-
Method Detail
-
getNode
public SqlNode getNode()
Description copied from interface:SqlValidatorNamespace
Returns the parse tree node at the root of this namespace.- Returns:
- parse tree node; null for
TableNamespace
-
validateImpl
public RelDataType validateImpl(RelDataType targetRowType)
Description copied from class:AbstractNamespace
Validates this scope and returns the type of the records it returns. External users should callAbstractNamespace.validate(org.apache.calcite.rel.type.RelDataType)
, which uses theAbstractNamespace.status
field to protect against cycles.- Specified by:
validateImpl
in classAbstractNamespace
- Parameters:
targetRowType
- Desired row type, must not be null, may be the data type 'unknown'.- Returns:
- record data type, never null
-
getRowType
public RelDataType getRowType()
Description copied from interface:SqlValidatorNamespace
Returns the row type of this namespace, which comprises a list of names and types of the output columns. If the scope's type has not yet been derived, derives it.- Specified by:
getRowType
in interfaceSqlValidatorNamespace
- Overrides:
getRowType
in classAbstractNamespace
- Returns:
- Row type of this namespace, never null, always a struct
-
-