| Package | Description |
|---|---|
| org.apache.calcite.adapter.enumerable |
Query optimizer rules for Java calling convention.
|
| org.apache.calcite.adapter.java |
Query provider based on Java in-memory data
structures.
|
| org.apache.calcite.adapter.jdbc |
Query provider based on a JDBC data source.
|
| org.apache.calcite.interpreter |
Provides an implementation of relational expressions using an interpreter.
|
| org.apache.calcite.jdbc |
JDBC driver for Calcite.
|
| org.apache.calcite.plan |
Defines interfaces for constructing rule-based optimizers of
relational expressions.
|
| org.apache.calcite.plan.hep |
Provides a heuristic planner implementation for the interfaces in
org.apache.calcite.plan. |
| org.apache.calcite.plan.volcano |
Optimizes relational expressions.
|
| org.apache.calcite.prepare |
Preparation of queries (parsing, planning and implementation).
|
| org.apache.calcite.rel |
Defines relational expressions.
|
| org.apache.calcite.rel.core |
Defines core relational expressions.
|
| org.apache.calcite.rel.externalize |
Facilities to externalize
RelNodes to and from
XML and JSON format. |
| org.apache.calcite.rel.logical |
Defines logical relational expressions.
|
| org.apache.calcite.rel.metadata |
Defines metadata interfaces and utilities for relational
expressions.
|
| org.apache.calcite.rel.rules |
Provides a core set of planner rules.
|
| org.apache.calcite.rel.type |
Defines a type system for relational expressions.
|
| org.apache.calcite.rex |
Provides a language for representing row-expressions.
|
| org.apache.calcite.schema |
Schema SPI.
|
| org.apache.calcite.schema.impl |
Utilities to help implement Calcite's SPIs.
|
| org.apache.calcite.sql |
Provides a SQL parser and object model.
|
| org.apache.calcite.sql.advise |
Provides hints and corrections for editing SQL statements.
|
| org.apache.calcite.sql.fun |
Defines the set of standard SQL row-level functions and
operators.
|
| org.apache.calcite.sql.type |
SQL type system.
|
| org.apache.calcite.sql.validate |
SQL validation.
|
| org.apache.calcite.sql2rel |
Translates a SQL parse tree to relational expression.
|
| Modifier and Type | Method and Description |
|---|---|
RelDataType |
PhysTypeImpl.getRowType() |
RelDataType |
PhysType.getRowType()
Returns the SQL row type.
|
RelDataType |
RexToLixTranslator.nullifyType(RelDataType type,
boolean nullable) |
RelDataType |
AggContext.returnRelType()
Returns the return type of the aggregate as
RelDataType. |
| Modifier and Type | Method and Description |
|---|---|
List<? extends RelDataType> |
AggContext.parameterRelTypes()
Returns the parameter types of the aggregate as
RelDataType. |
| Modifier and Type | Method and Description |
|---|---|
EnumerableTableFunctionScan |
EnumerableTableFunctionScan.copy(RelTraitSet traitSet,
List<RelNode> inputs,
RexNode rexCall,
Type elementType,
RelDataType rowType,
Set<RelColumnMapping> columnMappings) |
EnumerableProject |
EnumerableProject.copy(RelTraitSet traitSet,
RelNode input,
List<RexNode> projects,
RelDataType rowType) |
static EnumerableProject |
EnumerableProject.create(RelNode input,
List<? extends RexNode> projects,
RelDataType rowType)
Creates a LogicalProject, specifying row type rather than field names.
|
static EnumerableValues |
EnumerableValues.create(RelOptCluster cluster,
RelDataType rowType,
com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<RexLiteral>> tuples)
Creates an EnumerableValues.
|
RelDataType |
RexToLixTranslator.nullifyType(RelDataType type,
boolean nullable) |
static PhysType |
PhysTypeImpl.of(JavaTypeFactory typeFactory,
RelDataType rowType,
JavaRowFormat format) |
static PhysType |
PhysTypeImpl.of(JavaTypeFactory typeFactory,
RelDataType rowType,
JavaRowFormat format,
boolean optimize) |
JavaRowFormat |
JavaRowFormat.optimize(RelDataType rowType) |
static Expression |
RexToLixTranslator.translateLiteral(RexLiteral literal,
RelDataType type,
JavaTypeFactory typeFactory,
RexImpTable.NullAs nullAs)
Translates a literal.
|
| Constructor and Description |
|---|
EnumerableProject(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode input,
List<? extends RexNode> projects,
RelDataType rowType)
Creates an EnumerableProject.
|
EnumerableProject(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode input,
List<? extends RexNode> projects,
RelDataType rowType,
int flags)
Deprecated.
|
EnumerableTableFunctionScan(RelOptCluster cluster,
RelTraitSet traits,
List<RelNode> inputs,
Type elementType,
RelDataType rowType,
RexNode call,
Set<RelColumnMapping> columnMappings) |
| Modifier and Type | Method and Description |
|---|---|
RelDataType |
JavaTypeFactory.createStructType(Class clazz)
Creates a record type based upon the public fields of a Java class.
|
RelDataType |
JavaTypeFactory.createType(Type type)
Creates a type, deducing whether a record, scalar or primitive type
is needed.
|
RelDataType |
JavaTypeFactory.toSql(RelDataType type)
Converts a type in Java format to a SQL-oriented type.
|
| Modifier and Type | Method and Description |
|---|---|
Type |
JavaTypeFactory.getJavaClass(RelDataType type) |
RelDataType |
JavaTypeFactory.toSql(RelDataType type)
Converts a type in Java format to a SQL-oriented type.
|
| Modifier and Type | Method and Description |
|---|---|
JdbcRules.JdbcProject |
JdbcRules.JdbcProject.copy(RelTraitSet traitSet,
RelNode input,
List<RexNode> projects,
RelDataType rowType) |
| Constructor and Description |
|---|
JdbcRules.JdbcProject(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode input,
List<? extends RexNode> projects,
RelDataType rowType) |
JdbcRules.JdbcProject(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode input,
List<RexNode> projects,
RelDataType rowType,
int flags)
Deprecated.
|
| Constructor and Description |
|---|
JdbcImplementor.AliasContext(List<Pair<String,RelDataType>> aliases,
boolean qualified) |
| Modifier and Type | Method and Description |
|---|---|
RelDataType |
Bindables.BindableTableScan.deriveRowType() |
| Modifier and Type | Method and Description |
|---|---|
Scalar |
JaninoRexCompiler.compile(List<RexNode> nodes,
RelDataType inputRowType) |
Scalar |
Interpreter.compile(List<RexNode> nodes,
RelDataType inputRowType)
Compiles an expression to an executable form.
|
Bindables.BindableProject |
Bindables.BindableProject.copy(RelTraitSet traitSet,
RelNode input,
List<RexNode> projects,
RelDataType rowType) |
| Constructor and Description |
|---|
Bindables.BindableProject(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode input,
List<? extends RexNode> projects,
RelDataType rowType) |
| Modifier and Type | Class and Description |
|---|---|
class |
JavaRecordType
Record type based on a Java class.
|
| Modifier and Type | Field and Description |
|---|---|
RelDataType |
CalcitePrepare.ParseResult.rowType |
RelDataType |
CalcitePrepare.CalciteSignature.rowType |
| Modifier and Type | Method and Description |
|---|---|
RelDataType |
JavaTypeFactoryImpl.createStructType(Class type) |
RelDataType |
JavaTypeFactoryImpl.createType(Type type) |
RelDataType |
JavaTypeFactoryImpl.toSql(RelDataType type) |
| Modifier and Type | Method and Description |
|---|---|
Type |
JavaTypeFactoryImpl.getJavaClass(RelDataType type) |
RelDataType |
JavaTypeFactoryImpl.toSql(RelDataType type) |
| Constructor and Description |
|---|
CalcitePrepare.CalciteSignature(String sql,
List<AvaticaParameter> parameterList,
Map<String,Object> internalParameters,
RelDataType rowType,
List<ColumnMetaData> columns,
Meta.CursorFactory cursorFactory,
int maxRowCount,
Bindable<T> bindable) |
CalcitePrepare.ConvertResult(CalcitePrepareImpl prepare,
SqlValidator validator,
String sql,
SqlNode sqlNode,
RelDataType rowType,
RelNode relNode) |
CalcitePrepare.ParseResult(CalcitePrepareImpl prepare,
SqlValidator validator,
String sql,
SqlNode sqlNode,
RelDataType rowType) |
| Modifier and Type | Field and Description |
|---|---|
protected RelDataType |
RelOptAbstractTable.rowType |
| Modifier and Type | Method and Description |
|---|---|
static RelDataType |
RelOptUtil.createDmlRowType(SqlKind kind,
RelDataTypeFactory typeFactory)
Creates the row type descriptor for the result of a DML operation, which
is a single column named ROWCOUNT of type BIGINT for INSERT;
a single column named PLAN for EXPLAIN.
|
RelDataType |
RelOptNode.getRowType() |
RelDataType |
RelOptAbstractTable.getRowType() |
RelDataType |
RelOptTable.getRowType()
Describes the type of rows returned by this table.
|
static RelDataType |
RelOptUtil.permute(RelDataTypeFactory typeFactory,
RelDataType rowType,
Mapping mapping)
Permutes a record type according to a mapping.
|
| Modifier and Type | Method and Description |
|---|---|
static List<RelDataType> |
RelOptUtil.getFieldTypeList(RelDataType type)
Returns a list of the types of the fields in a given struct type.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
RelOptUtil.areRowTypesEqual(RelDataType rowType1,
RelDataType rowType2,
boolean compareNames) |
static RelNode |
RelOptUtil.createCastRel(RelNode rel,
RelDataType castRowType,
boolean rename)
Creates a projection which casts a rel's output to a desired row type.
|
static RelNode |
RelOptUtil.createCastRel(RelNode rel,
RelDataType castRowType,
boolean rename,
RelFactories.ProjectFactory projectFactory)
Creates a projection which casts a rel's output to a desired row type.
|
static RelNode |
RelOptUtil.createRenameRel(RelDataType outputType,
RelNode rel)
Creates a LogicalProject which accomplishes a rename.
|
static String |
RelOptUtil.dumpType(RelDataType type) |
static boolean |
RelOptUtil.eq(String desc1,
RelDataType type1,
String desc2,
RelDataType type2,
boolean fail)
Returns whether two types are equal using '='.
|
static boolean |
RelOptUtil.equal(String desc1,
RelDataType type1,
String desc2,
RelDataType type2,
boolean fail)
Returns whether two types are equal using
RelOptUtil.areRowTypesEqual(RelDataType, RelDataType, boolean). |
RelNode |
RelOptTable.ViewExpander.expandView(RelDataType rowType,
String queryString,
List<String> schemaPath) |
static List<RelDataType> |
RelOptUtil.getFieldTypeList(RelDataType type)
Returns a list of the types of the fields in a given struct type.
|
static Mappings.TargetMapping |
RelOptUtil.permutation(List<RexNode> nodes,
RelDataType inputRowType)
Returns a permutation describing where output fields come from.
|
static RelDataType |
RelOptUtil.permute(RelDataTypeFactory typeFactory,
RelDataType rowType,
Mapping mapping)
Permutes a record type according to a mapping.
|
static RelNode |
RelOptUtil.renameIfNecessary(RelNode rel,
RelDataType desiredRowType)
Renames a relational expression to make its field names the same as
another row type.
|
| Constructor and Description |
|---|
RelOptAbstractTable(RelOptSchema schema,
String name,
RelDataType rowType) |
| Modifier and Type | Method and Description |
|---|---|
protected RelDataType |
HepRelVertex.deriveRowType() |
| Modifier and Type | Method and Description |
|---|---|
protected RelDataType |
RelSubset.deriveRowType() |
| Modifier and Type | Field and Description |
|---|---|
protected RelDataType |
Prepare.parameterRowType |
protected RelDataType |
Prepare.PreparedResultImpl.parameterRowType |
protected RelDataType |
Prepare.PreparedResultImpl.rowType |
| Modifier and Type | Method and Description |
|---|---|
RelDataType |
CalciteCatalogReader.createTypeFromProjection(RelDataType type,
List<String> columnNameList) |
RelDataType |
CalciteCatalogReader.getNamedType(SqlIdentifier typeName) |
RelDataType |
Prepare.PreparedExplain.getParameterRowType() |
RelDataType |
Prepare.PreparedResult.getParameterRowType()
Returns a record type whose fields are the parameters of this statement.
|
RelDataType |
Prepare.PreparedResultImpl.getParameterRowType() |
RelDataType |
Prepare.PreparedResultImpl.getPhysicalRowType()
Returns the physical row type of this prepared statement.
|
RelDataType |
RelOptTableImpl.getRowType() |
| Modifier and Type | Method and Description |
|---|---|
static RelOptTableImpl |
RelOptTableImpl.create(RelOptSchema schema,
RelDataType rowType,
CalciteSchema.TableEntry tableEntry,
Double rowCount) |
static RelOptTableImpl |
RelOptTableImpl.create(RelOptSchema schema,
RelDataType rowType,
List<String> names,
Expression expression) |
static RelOptTableImpl |
RelOptTableImpl.create(RelOptSchema schema,
RelDataType rowType,
Table table) |
protected abstract Prepare.PreparedResult |
Prepare.createPreparedExplanation(RelDataType resultType,
RelDataType parameterRowType,
RelNode rootRel,
boolean explainAsXml,
SqlExplainLevel detailLevel) |
RelDataType |
CalciteCatalogReader.createTypeFromProjection(RelDataType type,
List<String> columnNameList) |
RelNode |
PlannerImpl.ViewExpanderImpl.expandView(RelDataType rowType,
String queryString,
List<String> schemaPath) |
RelNode |
Prepare.expandView(RelDataType rowType,
String queryString,
List<String> schemaPath)
Returns a relational expression which is to be substituted for an access
to a SQL view.
|
RelDataTypeField |
CalciteCatalogReader.field(RelDataType rowType,
String alias) |
int |
CalciteCatalogReader.fieldOrdinal(RelDataType rowType,
String alias) |
protected abstract Prepare.PreparedResult |
Prepare.implement(RelDataType rowType,
RelNode rootRel,
SqlKind sqlKind)
Implements a physical query plan.
|
| Constructor and Description |
|---|
Prepare.PreparedExplain(RelDataType rowType,
RelDataType parameterRowType,
RelNode rel,
boolean asXml,
SqlExplainLevel detailLevel) |
Prepare.PreparedResultImpl(RelDataType rowType,
RelDataType parameterRowType,
List<List<String>> fieldOrigins,
RelNode rootRel,
TableModify.Operation tableModOp,
boolean isDml) |
| Modifier and Type | Field and Description |
|---|---|
protected RelDataType |
AbstractRelNode.rowType
Cached type of this relational expression.
|
| Modifier and Type | Method and Description |
|---|---|
protected RelDataType |
AbstractRelNode.deriveRowType() |
protected RelDataType |
SingleRel.deriveRowType() |
RelDataType |
AbstractRelNode.getExpectedInputRowType(int ordinalInParent) |
RelDataType |
RelNode.getExpectedInputRowType(int ordinalInParent)
Returns the type of the rows expected for an input.
|
RelDataType |
AbstractRelNode.getRowType() |
RelDataType |
RelNode.getRowType()
Returns the type of the rows returned by this relational expression.
|
RelDataType |
RelInput.getRowType(String tag) |
RelDataType |
RelInput.getRowType(String expressionsTag,
String fieldsTag) |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
RelCollationImpl.isValid(RelDataType rowType,
List<RelCollation> collationList,
boolean fail)
Deprecated.
|
static boolean |
RelCollations.isValid(RelDataType rowType,
List<RelCollation> collationList,
boolean fail)
Checks that a collection of collations is valid.
|
| Modifier and Type | Field and Description |
|---|---|
RelDataType |
AggregateCall.type |
| Modifier and Type | Method and Description |
|---|---|
static RelDataType |
Join.createJoinType(RelDataTypeFactory typeFactory,
RelDataType leftType,
RelDataType rightType,
List<String> fieldNameList,
List<RelDataTypeField> systemFieldList)
Returns the type the row which results when two relations are joined.
|
static RelDataType |
Collect.deriveCollectRowType(SingleRel rel,
String fieldName)
Derives the output type of a collect relational expression.
|
static RelDataType |
Join.deriveJoinRowType(RelDataType leftType,
RelDataType rightType,
JoinRelType joinType,
RelDataTypeFactory typeFactory,
List<String> fieldNameList,
List<RelDataTypeField> systemFieldList)
Derives the type of a join relational expression.
|
protected RelDataType |
Uncollect.deriveRowType() |
protected RelDataType |
Collect.deriveRowType() |
protected RelDataType |
Aggregate.deriveRowType() |
protected RelDataType |
Values.deriveRowType() |
protected RelDataType |
Join.deriveRowType() |
RelDataType |
SemiJoin.deriveRowType() |
RelDataType |
TableModify.deriveRowType() |
protected RelDataType |
SetOp.deriveRowType() |
RelDataType |
TableScan.deriveRowType() |
protected RelDataType |
Correlate.deriveRowType() |
static RelDataType |
Aggregate.deriveRowType(RelDataTypeFactory typeFactory,
RelDataType inputRowType,
boolean indicator,
ImmutableBitSet groupSet,
List<ImmutableBitSet> groupSets,
List<AggregateCall> aggCalls)
Computes the row type of an
Aggregate before it exists. |
static RelDataType |
Uncollect.deriveUncollectRowType(RelNode rel)
Returns the row type returned by applying the 'UNNEST' operation to a
relational expression.
|
RelDataType |
TableModify.getExpectedInputRowType(int ordinalInParent) |
RelDataType |
Aggregate.AggCallBinding.getOperandType(int ordinal) |
RelDataType |
AggregateCall.getType()
Returns the result type.
|
| Modifier and Type | Method and Description |
|---|---|
RexCall |
Window.RexWinAggCall.clone(RelDataType type,
List<RexNode> operands) |
abstract TableFunctionScan |
TableFunctionScan.copy(RelTraitSet traitSet,
List<RelNode> inputs,
RexNode rexCall,
Type elementType,
RelDataType rowType,
Set<RelColumnMapping> columnMappings)
Copies this relational expression, substituting traits and
inputs.
|
abstract Project |
Project.copy(RelTraitSet traitSet,
RelNode input,
List<RexNode> projects,
RelDataType rowType)
Copies a project.
|
Project |
Project.copy(RelTraitSet traitSet,
RelNode input,
List<RexNode> projects,
RelDataType rowType,
int flags)
Deprecated.
|
static AggregateCall |
AggregateCall.create(SqlAggFunction aggFunction,
boolean distinct,
List<Integer> argList,
int groupCount,
RelNode input,
RelDataType type,
String name)
Creates an AggregateCall, inferring its type if
type is null. |
static RelDataType |
Join.createJoinType(RelDataTypeFactory typeFactory,
RelDataType leftType,
RelDataType rightType,
List<String> fieldNameList,
List<RelDataTypeField> systemFieldList)
Returns the type the row which results when two relations are joined.
|
static RelDataType |
Join.deriveJoinRowType(RelDataType leftType,
RelDataType rightType,
JoinRelType joinType,
RelDataTypeFactory typeFactory,
List<String> fieldNameList,
List<RelDataTypeField> systemFieldList)
Derives the type of a join relational expression.
|
static RelDataType |
Aggregate.deriveRowType(RelDataTypeFactory typeFactory,
RelDataType inputRowType,
boolean indicator,
ImmutableBitSet groupSet,
List<ImmutableBitSet> groupSets,
List<AggregateCall> aggCalls)
Computes the row type of an
Aggregate before it exists. |
| Constructor and Description |
|---|
AggregateCall(SqlAggFunction aggFunction,
boolean distinct,
List<Integer> argList,
RelDataType type,
String name)
Creates an AggregateCall.
|
Project(RelOptCluster cluster,
RelTraitSet traits,
RelNode input,
List<? extends RexNode> projects,
RelDataType rowType)
Creates a Project.
|
Project(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode input,
List<? extends RexNode> projects,
RelDataType rowType,
int flags)
Deprecated.
|
TableFunctionScan(RelOptCluster cluster,
RelTraitSet traits,
List<RelNode> inputs,
RexNode rexCall,
Type elementType,
RelDataType rowType,
Set<RelColumnMapping> columnMappings)
Creates a
TableFunctionScan. |
Values(RelOptCluster cluster,
RelDataType rowType,
com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<RexLiteral>> tuples,
RelTraitSet traits)
Creates a new Values.
|
Window.RexWinAggCall(SqlAggFunction aggFun,
RelDataType type,
List<RexNode> operands,
int ordinal)
Creates a RexWinAggCall.
|
Window(RelOptCluster cluster,
RelTraitSet traits,
RelNode child,
List<RexLiteral> constants,
RelDataType rowType,
List<Window.Group> groups)
Creates a window relational expression.
|
| Constructor and Description |
|---|
Aggregate.AggCallBinding(RelDataTypeFactory typeFactory,
SqlAggFunction aggFunction,
List<RelDataType> operands,
int groupCount)
Creates an AggCallBinding
|
| Modifier and Type | Method and Description |
|---|---|
RelDataType |
RelJson.toType(RelDataTypeFactory typeFactory,
Object o) |
| Modifier and Type | Method and Description |
|---|---|
LogicalTableFunctionScan |
LogicalTableFunctionScan.copy(RelTraitSet traitSet,
List<RelNode> inputs,
RexNode rexCall,
Type elementType,
RelDataType rowType,
Set<RelColumnMapping> columnMappings) |
LogicalProject |
LogicalProject.copy(RelTraitSet traitSet,
RelNode input,
List<RexNode> projects,
RelDataType rowType) |
static LogicalProject |
LogicalProject.create(RelNode input,
List<? extends RexNode> projects,
RelDataType rowType)
Creates a LogicalProject, specifying row type rather than field names.
|
static LogicalTableFunctionScan |
LogicalTableFunctionScan.create(RelOptCluster cluster,
List<RelNode> inputs,
RexNode rexCall,
Type elementType,
RelDataType rowType,
Set<RelColumnMapping> columnMappings)
Creates a LogicalTableFunctionScan.
|
static LogicalValues |
LogicalValues.create(RelOptCluster cluster,
RelDataType rowType,
com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<RexLiteral>> tuples)
Creates a LogicalValues.
|
static LogicalValues |
LogicalValues.createEmpty(RelOptCluster cluster,
RelDataType rowType)
Creates a LogicalValues that outputs no rows of a given row type.
|
| Constructor and Description |
|---|
LogicalProject(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode input,
List<? extends RexNode> projects,
RelDataType rowType)
Creates a LogicalProject.
|
LogicalProject(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode input,
List<? extends RexNode> projects,
RelDataType rowType,
int flags)
Deprecated.
|
LogicalTableFunctionScan(RelOptCluster cluster,
List<RelNode> inputs,
RexNode rexCall,
Type elementType,
RelDataType rowType,
Set<RelColumnMapping> columnMappings)
Deprecated.
|
LogicalTableFunctionScan(RelOptCluster cluster,
RelTraitSet traitSet,
List<RelNode> inputs,
RexNode rexCall,
Type elementType,
RelDataType rowType,
Set<RelColumnMapping> columnMappings)
Creates a
LogicalTableFunctionScan. |
LogicalValues(RelOptCluster cluster,
RelDataType rowType,
com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<RexLiteral>> tuples)
Deprecated.
|
LogicalValues(RelOptCluster cluster,
RelTraitSet traitSet,
RelDataType rowType,
com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<RexLiteral>> tuples)
Creates a LogicalValues.
|
LogicalWindow(RelOptCluster cluster,
RelTraitSet traits,
RelNode child,
List<RexLiteral> constants,
RelDataType rowType,
List<Window.Group> groups)
Creates a LogicalWindow.
|
| Modifier and Type | Method and Description |
|---|---|
Double |
RelMdSize.averageTypeValueSize(RelDataType type)
Estimates the average size (in bytes) of a value of a type.
|
double |
RelMdSize.typeValueSize(RelDataType type,
Comparable value)
Estimates the average size (in bytes) of a value of a type.
|
static List<RelCollation> |
RelMdCollation.values(RelDataType rowType,
com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<RexLiteral>> tuples)
Helper method to determine a
Values's collation. |
static RelDistribution |
RelMdDistribution.values(RelDataType rowType,
com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<RexLiteral>> tuples)
Helper method to determine a
Values's distribution. |
| Modifier and Type | Method and Description |
|---|---|
RelDataType |
MultiJoin.deriveRowType() |
| Modifier and Type | Method and Description |
|---|---|
protected RexNode |
ReduceDecimalsRule.RexExpander.encodeValue(RexNode value,
RelDataType decimalType)
Casts a decimal's integer representation to a decimal node.
|
protected RexNode |
ReduceDecimalsRule.RexExpander.encodeValue(RexNode value,
RelDataType decimalType,
boolean checkOverflow)
Casts a decimal's integer representation to a decimal node.
|
protected RexNode |
ReduceDecimalsRule.RexExpander.ensureType(RelDataType type,
RexNode node)
Ensures expression is interpreted as a specified type.
|
protected RexNode |
ReduceDecimalsRule.RexExpander.ensureType(RelDataType type,
RexNode node,
boolean matchNullability)
Ensures expression is interpreted as a specified type.
|
static boolean |
ProjectRemoveRule.isIdentity(List<? extends RexNode> exps,
RelDataType childRowType) |
| Constructor and Description |
|---|
MultiJoin(RelOptCluster cluster,
List<RelNode> inputs,
RexNode joinFilter,
RelDataType rowType,
boolean isFullOuterJoin,
List<RexNode> outerJoinConditions,
List<JoinRelType> joinTypes,
List<ImmutableBitSet> projFields,
com.google.common.collect.ImmutableMap<Integer,ImmutableIntList> joinFieldRefCountsMap,
RexNode postJoinFilter)
Constructs a MultiJoin.
|
| Modifier and Type | Class and Description |
|---|---|
class |
RelCrossType
Type of the cartesian product of two or more sets of records.
|
class |
RelDataTypeFactoryImpl.JavaType
Type which is based upon a Java class.
|
class |
RelDataTypeImpl
RelDataTypeImpl is an abstract base for implementations of
RelDataType. |
class |
RelRecordType
RelRecordType represents a structured type having named fields.
|
| Modifier and Type | Field and Description |
|---|---|
com.google.common.collect.ImmutableList<RelDataType> |
RelCrossType.types |
| Modifier and Type | Method and Description |
|---|---|
RelDataType |
RelDataTypeFactory.FieldInfoBuilder.build()
Creates a struct type with the current contents of this builder.
|
protected RelDataType |
RelDataTypeFactoryImpl.canonize(List<String> names,
List<RelDataType> types)
Looks up a type using a temporary key, and if not present, creates
a permanent key and type.
|
protected RelDataType |
RelDataTypeFactoryImpl.canonize(RelDataType type)
Registers a type, or returns the existing type if it is already
registered.
|
RelDataType |
RelDataTypeFactory.copyType(RelDataType type)
Duplicates a type, making a deep copy.
|
RelDataType |
RelDataTypeFactoryImpl.copyType(RelDataType type) |
RelDataType |
RelDataTypeFactory.createArrayType(RelDataType elementType,
long maxCardinality)
Creates an array type.
|
RelDataType |
RelDataTypeFactory.createDecimalProduct(RelDataType type1,
RelDataType type2)
Infers the return type of a decimal multiplication.
|
RelDataType |
RelDataTypeFactoryImpl.createDecimalProduct(RelDataType type1,
RelDataType type2)
implement RelDataTypeFactory with SQL 2003 compliant behavior.
|
RelDataType |
RelDataTypeFactory.createDecimalQuotient(RelDataType type1,
RelDataType type2)
Infers the return type of a decimal division.
|
RelDataType |
RelDataTypeFactoryImpl.createDecimalQuotient(RelDataType type1,
RelDataType type2)
Rules:
Let p1, s1 be the precision and scale of the first operand
Let p2, s2 be the precision and scale of the second operand
Let p, s be the precision and scale of the result
Let d be the number of whole digits in the result
Then the result type is a decimal with:
d = p1 - s1 + s2
s < max(6, s1 + p2 + 1)
p = d + s
p and s are capped at their maximum values
|
RelDataType |
RelDataTypeFactory.createJavaType(Class clazz)
Creates a type which corresponds to a Java class.
|
RelDataType |
RelDataTypeFactoryImpl.createJavaType(Class clazz) |
RelDataType |
RelDataTypeFactory.createJoinType(RelDataType... types)
Creates a cartesian product type.
|
RelDataType |
RelDataTypeFactoryImpl.createJoinType(RelDataType... types) |
RelDataType |
RelDataTypeFactory.createMapType(RelDataType keyType,
RelDataType valueType)
Creates a map type.
|
RelDataType |
RelDataTypeFactory.createMultisetType(RelDataType elementType,
long maxCardinality)
Creates a multiset type.
|
RelDataType |
RelDataTypeFactory.createSqlIntervalType(SqlIntervalQualifier intervalQualifier)
Creates a SQL interval type.
|
RelDataType |
RelDataTypeFactory.createSqlType(SqlTypeName typeName)
Creates a SQL type with no precision or scale.
|
RelDataType |
RelDataTypeFactory.createSqlType(SqlTypeName typeName,
int precision)
Creates a SQL type with length (precision) but no scale.
|
RelDataType |
RelDataTypeFactory.createSqlType(SqlTypeName typeName,
int precision,
int scale)
Creates a SQL type with precision and scale.
|
RelDataType |
RelDataTypeFactory.createStructType(List<? extends Map.Entry<String,RelDataType>> fieldList)
Creates a type which represents a structured collection of fieldList,
obtaining the field information from a list of (name, type) pairs.
|
RelDataType |
RelDataTypeFactoryImpl.createStructType(List<? extends Map.Entry<String,RelDataType>> fieldList) |
RelDataType |
RelDataTypeFactory.createStructType(List<RelDataType> typeList,
List<String> fieldNameList)
Creates a type which represents a structured collection of fields, given
lists of the names and types of the fields.
|
RelDataType |
RelDataTypeFactoryImpl.createStructType(List<RelDataType> typeList,
List<String> fieldNameList) |
RelDataType |
RelDataTypeFactory.createStructType(RelDataTypeFactory.FieldInfo fieldInfo)
Creates a type which represents a structured collection of fields,
obtaining the field information via a callback.
|
RelDataType |
RelDataTypeFactoryImpl.createStructType(RelDataTypeFactory.FieldInfo fieldInfo) |
RelDataType |
RelDataTypeFactory.createTypeWithCharsetAndCollation(RelDataType type,
Charset charset,
SqlCollation collation)
Creates a Type which is the same as another type but with possibly
different charset or collation.
|
RelDataType |
RelDataTypeFactory.createTypeWithNullability(RelDataType type,
boolean nullable)
Creates a type which is the same as another type but with possibly
different nullability.
|
RelDataType |
RelDataTypeFactoryImpl.createTypeWithNullability(RelDataType type,
boolean nullable) |
RelDataType |
RelDataTypeImpl.getComponentType() |
RelDataType |
RelDataTypeFactoryImpl.JavaType.getComponentType() |
RelDataType |
RelDataType.getComponentType()
Gets the component type if this type is a collection, otherwise null.
|
RelDataType |
RelDataTypeFactory.FieldInfo.getFieldType(int index)
Returns the type of a given field.
|
RelDataType |
RelDataTypeFactory.FieldInfoBuilder.getFieldType(int index) |
RelDataType |
RelDataTypeImpl.getKeyType() |
RelDataType |
RelDataType.getKeyType()
Gets the key type if this type is a map, otherwise null.
|
RelDataType |
RelDataTypeField.getType()
Gets the type of this field.
|
RelDataType |
RelDataTypeFieldImpl.getType() |
RelDataType |
RelDataTypeFieldImpl.getValue() |
RelDataType |
RelDataTypeImpl.getValueType() |
RelDataType |
RelDataType.getValueType()
Gets the value type if this type is a map, otherwise null.
|
RelDataType |
RelDataTypeFactory.leastRestrictive(List<RelDataType> types)
Returns the most general of a set of types (that is, one type to which
they can all be cast), or null if conversion is not possible.
|
RelDataType |
RelDataTypeFactoryImpl.leastRestrictive(List<RelDataType> types) |
protected RelDataType |
RelDataTypeFactoryImpl.leastRestrictiveStructuredType(List<RelDataType> types) |
RelDataType |
RelDataTypeFieldImpl.setValue(RelDataType value) |
| Modifier and Type | Method and Description |
|---|---|
RelDataTypeFactory.FieldInfoBuilder |
RelDataTypeFactory.FieldInfoBuilder.add(String name,
RelDataType type)
Adds a field with given name and type.
|
protected RelDataType |
RelDataTypeFactoryImpl.canonize(RelDataType type)
Registers a type, or returns the existing type if it is already
registered.
|
int |
RelDataTypePrecedenceList.compareTypePrecedence(RelDataType type1,
RelDataType type2)
Compares the precedence of two types.
|
boolean |
RelDataTypePrecedenceList.containsType(RelDataType type)
Determines whether a type appears in this precedence list.
|
RelDataType |
RelDataTypeFactory.copyType(RelDataType type)
Duplicates a type, making a deep copy.
|
RelDataType |
RelDataTypeFactoryImpl.copyType(RelDataType type) |
RelDataType |
RelDataTypeFactory.createArrayType(RelDataType elementType,
long maxCardinality)
Creates an array type.
|
RelDataType |
RelDataTypeFactory.createDecimalProduct(RelDataType type1,
RelDataType type2)
Infers the return type of a decimal multiplication.
|
RelDataType |
RelDataTypeFactoryImpl.createDecimalProduct(RelDataType type1,
RelDataType type2)
implement RelDataTypeFactory with SQL 2003 compliant behavior.
|
RelDataType |
RelDataTypeFactory.createDecimalQuotient(RelDataType type1,
RelDataType type2)
Infers the return type of a decimal division.
|
RelDataType |
RelDataTypeFactoryImpl.createDecimalQuotient(RelDataType type1,
RelDataType type2)
Rules:
Let p1, s1 be the precision and scale of the first operand
Let p2, s2 be the precision and scale of the second operand
Let p, s be the precision and scale of the result
Let d be the number of whole digits in the result
Then the result type is a decimal with:
d = p1 - s1 + s2
s < max(6, s1 + p2 + 1)
p = d + s
p and s are capped at their maximum values
|
RelDataType |
RelDataTypeFactory.createJoinType(RelDataType... types)
Creates a cartesian product type.
|
RelDataType |
RelDataTypeFactoryImpl.createJoinType(RelDataType... types) |
RelDataType |
RelDataTypeFactory.createMapType(RelDataType keyType,
RelDataType valueType)
Creates a map type.
|
RelDataType |
RelDataTypeFactory.createMultisetType(RelDataType elementType,
long maxCardinality)
Creates a multiset type.
|
RelDataType |
RelDataTypeFactory.createTypeWithCharsetAndCollation(RelDataType type,
Charset charset,
SqlCollation collation)
Creates a Type which is the same as another type but with possibly
different charset or collation.
|
RelDataType |
RelDataTypeFactory.createTypeWithNullability(RelDataType type,
boolean nullable)
Creates a type which is the same as another type but with possibly
different nullability.
|
RelDataType |
RelDataTypeFactoryImpl.createTypeWithNullability(RelDataType type,
boolean nullable) |
static RelDataTypeField |
RelDataTypeImpl.extra(RelDataType rowType)
Returns the "extra" field in a row type whose presence signals that
fields will come into existence just by asking for them.
|
static boolean |
RelDataTypeFactoryImpl.isJavaType(RelDataType t) |
static RelProtoDataType |
RelDataTypeImpl.proto(RelDataType protoType)
Returns an implementation of
RelProtoDataType
that copies a given type using the given type factory. |
RelDataType |
RelDataTypeFieldImpl.setValue(RelDataType value) |
boolean |
RelDataTypeFactory.useDoubleMultiplication(RelDataType type1,
RelDataType type2)
Returns whether a decimal multiplication should be implemented by casting
arguments to double values.
|
boolean |
RelDataTypeFactoryImpl.useDoubleMultiplication(RelDataType type1,
RelDataType type2) |
| Modifier and Type | Method and Description |
|---|---|
RelDataTypeFactory.FieldInfoBuilder |
RelDataTypeFactory.FieldInfoBuilder.addAll(Iterable<? extends Map.Entry<String,RelDataType>> fields)
Adds all fields in a collection.
|
protected RelDataType |
RelDataTypeFactoryImpl.canonize(List<String> names,
List<RelDataType> types)
Looks up a type using a temporary key, and if not present, creates
a permanent key and type.
|
RelDataType |
RelDataTypeFactory.createStructType(List<? extends Map.Entry<String,RelDataType>> fieldList)
Creates a type which represents a structured collection of fieldList,
obtaining the field information from a list of (name, type) pairs.
|
RelDataType |
RelDataTypeFactoryImpl.createStructType(List<? extends Map.Entry<String,RelDataType>> fieldList) |
RelDataType |
RelDataTypeFactory.createStructType(List<RelDataType> typeList,
List<String> fieldNameList)
Creates a type which represents a structured collection of fields, given
lists of the names and types of the fields.
|
RelDataType |
RelDataTypeFactoryImpl.createStructType(List<RelDataType> typeList,
List<String> fieldNameList) |
RelDataType |
RelDataTypeFactory.leastRestrictive(List<RelDataType> types)
Returns the most general of a set of types (that is, one type to which
they can all be cast), or null if conversion is not possible.
|
RelDataType |
RelDataTypeFactoryImpl.leastRestrictive(List<RelDataType> types) |
protected RelDataType |
RelDataTypeFactoryImpl.leastRestrictiveStructuredType(List<RelDataType> types) |
| Constructor and Description |
|---|
RelDataTypeFieldImpl(String name,
int index,
RelDataType type)
Creates a RelDataTypeFieldImpl.
|
| Constructor and Description |
|---|
RelCrossType(List<RelDataType> types,
List<RelDataTypeField> fields)
Creates a cartesian product type.
|
| Modifier and Type | Field and Description |
|---|---|
protected RelDataType |
RexVariable.type |
| Modifier and Type | Field and Description |
|---|---|
protected List<RelDataType> |
RexChecker.inputTypeList |
| Modifier and Type | Method and Description |
|---|---|
static RelDataType |
RexUtil.createStructType(RelDataTypeFactory typeFactory,
List<? extends RexNode> exprs,
List<String> names)
Creates a record type with specified field names.
|
static RelDataType |
RexUtil.createStructType(RelDataTypeFactory typeFactory,
List<RexNode> exprs)
Creates a record type with anonymous field names.
|
RelDataType |
RexBuilder.deriveReturnType(SqlOperator op,
List<? extends RexNode> exprs)
Derives the return type of a call to an operator.
|
RelDataType |
RexProgram.getInputRowType()
Returns the type of the input row to the program.
|
RelDataType |
RexProgramBuilder.getInputRowType()
Returns the rowtype of the input to the program
|
RelDataType |
RexCallBinding.getOperandType(int ordinal) |
RelDataType |
RexProgram.getOutputRowType()
Returns the type of the output row from this program.
|
RelDataType |
RexFieldAccess.getType() |
RelDataType |
RexVariable.getType() |
RelDataType |
RexRangeRef.getType() |
abstract RelDataType |
RexNode.getType() |
RelDataType |
RexLiteral.getType() |
RelDataType |
RexCall.getType() |
RelDataType |
RexBuilder.matchNullability(RelDataType type,
RexNode value)
Ensures that a type's nullability matches a value's nullability.
|
| Modifier and Type | Method and Description |
|---|---|
static List<RelDataType> |
RexUtil.types(List<? extends RexNode> nodes)
Transforms a list of expressions into a list of their types.
|
| Modifier and Type | Method and Description |
|---|---|
RexCall |
RexCall.clone(RelDataType type,
List<RexNode> operands)
Creates a new call to the same operator with different operands.
|
RexCall |
RexOver.clone(RelDataType type,
List<RexNode> operands) |
static boolean |
RexUtil.compatibleTypes(List<RexNode> exprs,
RelDataType type,
boolean fail)
Returns whether the type of an array of expressions is compatible with a
struct type.
|
static boolean |
RexUtil.containForwardRefs(List<RexNode> exprs,
RelDataType inputRowType,
boolean fail)
Returns whether an array of expressions contains a forward reference.
|
static boolean |
RexUtil.containIdentity(List<? extends RexNode> exprs,
RelDataType rowType,
boolean fail)
Returns whether the leading edge of a given array of expressions is
wholly
RexInputRef objects with types corresponding to the
underlying datatype. |
static RexProgram |
RexProgram.create(RelDataType inputRowType,
List<? extends RexNode> projectExprs,
RexNode conditionExpr,
List<String> fieldNames,
RexBuilder rexBuilder)
Creates a program which calculates projections and filters rows based
upon a condition.
|
static RexProgram |
RexProgram.create(RelDataType inputRowType,
List<? extends RexNode> projectExprs,
RexNode conditionExpr,
RelDataType outputRowType,
RexBuilder rexBuilder)
Creates a program which calculates projections and filters rows based
upon a condition.
|
static RexProgramBuilder |
RexProgramBuilder.create(RexBuilder rexBuilder,
RelDataType inputRowType,
List<RexNode> exprList,
List<RexLocalRef> projectRefList,
RexLocalRef conditionRef,
RelDataType outputRowType,
boolean normalize)
Creates a program builder with the same contents as a program.
|
static RexProgramBuilder |
RexProgramBuilder.create(RexBuilder rexBuilder,
RelDataType inputRowType,
List<RexNode> exprList,
List<RexLocalRef> projectRefList,
RexLocalRef conditionRef,
RelDataType outputRowType,
RexShuttle shuttle,
boolean updateRefs)
Creates a program builder with the same contents as a program, applying a
shuttle first.
|
static RexProgram |
RexProgram.createIdentity(RelDataType rowType)
Creates the identity program.
|
static RexProgram |
RexProgram.createIdentity(RelDataType rowType,
RelDataType outputRowType)
Creates a program that projects its input fields but with possibly
different names for the output fields.
|
RexNode |
RexBuilder.encodeIntervalOrDecimal(RexNode value,
RelDataType type,
boolean checkOverflow)
Casts a decimal's integer representation to a decimal node.
|
RexNode |
RexBuilder.ensureType(RelDataType type,
RexNode node,
boolean matchNullability)
Ensures expression is interpreted as a specified type.
|
static List<RexNode> |
RexUtil.fixUp(RexBuilder rexBuilder,
List<RexNode> nodes,
RelDataType rowType)
Fixes up the type of all
RexInputRefs in an
expression to match differences in nullability. |
static RexLiteral |
RexLiteral.fromJdbcString(RelDataType type,
SqlTypeName typeName,
String literal)
Converts a Jdbc string into a RexLiteral.
|
static List<RexNode> |
RexUtil.generateCastExpressions(RexBuilder rexBuilder,
RelDataType lhsRowType,
List<RexNode> rhsExps)
Generates a cast for a row type.
|
static List<RexNode> |
RexUtil.generateCastExpressions(RexBuilder rexBuilder,
RelDataType lhsRowType,
RelDataType rhsRowType)
Generates a cast from one row type to another
|
RexExecutable |
RexExecutorImpl.getExecutable(RexBuilder rexBuilder,
List<RexNode> exps,
RelDataType rowType)
Creates an
RexExecutable that allows to apply the
generated code during query processing (filter, projection). |
List<RexInputRef> |
RexBuilder.identityProjects(RelDataType rowType)
Creates a list of
RexInputRef expressions,
projecting the fields of a given record type. |
RexNode |
RexBuilder.makeAbstractCast(RelDataType type,
RexNode exp)
Creates a call to the CAST operator.
|
RexLiteral |
RexBuilder.makeApproxLiteral(BigDecimal bd,
RelDataType type)
Creates an approximate numeric literal (double or float).
|
RexNode |
RexBuilder.makeCall(RelDataType returnType,
SqlOperator op,
List<RexNode> exprs)
Creates a call with a list of arguments and a predetermined type.
|
RexNode |
RexBuilder.makeCast(RelDataType type,
RexNode exp)
Creates a call to the CAST operator, expanding if possible.
|
RexNode |
RexBuilder.makeCorrel(RelDataType type,
String name)
Creates an expression referencing a correlation variable.
|
RexDynamicParam |
RexBuilder.makeDynamicParam(RelDataType type,
int index)
Creates a reference to a dynamic parameter
|
RexLiteral |
RexBuilder.makeExactLiteral(BigDecimal bd,
RelDataType type)
Creates a numeric literal.
|
RexInputRef |
RexBuilder.makeInputRef(RelDataType type,
int i)
Creates a reference to a given field of the input record.
|
protected RexLiteral |
RexBuilder.makeLiteral(Comparable o,
RelDataType type,
SqlTypeName typeName)
Internal method to create a call to a literal.
|
RexNode |
RexBuilder.makeLiteral(Object value,
RelDataType type,
boolean allowCast)
Creates a literal of a given type.
|
RexNode |
RexBuilder.makeNewInvocation(RelDataType type,
List<RexNode> exprs)
Creates an invocation of the NEW operator.
|
RexNode |
RexBuilder.makeOver(RelDataType type,
SqlAggFunction operator,
List<RexNode> exprs,
List<RexNode> partitionKeys,
com.google.common.collect.ImmutableList<RexFieldCollation> orderKeys,
RexWindowBound lowerBound,
RexWindowBound upperBound,
boolean physical,
boolean allowPartial,
boolean nullWhenCountZero)
Creates a call to a windowed agg.
|
RexRangeRef |
RexBuilder.makeRangeReference(RelDataType type,
int offset,
boolean nullable)
Creates a reference to all the fields in the row.
|
RexNode |
RexBuilder.makeReinterpretCast(RelDataType type,
RexNode exp,
RexNode checkOverflow)
Makes a reinterpret cast.
|
RexNode |
RexBuilder.makeZeroLiteral(RelDataType type)
Creates a literal of the default value for the given type.
|
RelDataType |
RexBuilder.matchNullability(RelDataType type,
RexNode value)
Ensures that a type's nullability matches a value's nullability.
|
static RexInputRef |
RexInputRef.of(int index,
RelDataType rowType)
Creates a reference to a given field in a row type.
|
| Modifier and Type | Method and Description |
|---|---|
RexNode |
RexBuilder.addAggCall(AggregateCall aggCall,
int groupCount,
boolean indicator,
List<AggregateCall> aggCalls,
Map<AggregateCall,RexNode> aggCallMapping,
List<RelDataType> aggArgTypes)
Creates a reference to an aggregate call, checking for repeated calls.
|
static List<RelDataTypeFamily> |
RexUtil.families(List<RelDataType> types) |
| Constructor and Description |
|---|
RexCall(RelDataType type,
SqlOperator op,
List<? extends RexNode> operands) |
RexChecker(RelDataType inputRowType,
boolean fail)
Creates a RexChecker with a given input row type.
|
RexDynamicParam(RelDataType type,
int index)
Creates a dynamic parameter.
|
RexInputRef(int index,
RelDataType type)
Creates an input variable.
|
RexLocalRef(int index,
RelDataType type)
Creates a local variable.
|
RexProgram(RelDataType inputRowType,
List<? extends RexNode> exprs,
List<RexLocalRef> projects,
RexLocalRef condition,
RelDataType outputRowType)
Creates a program.
|
RexProgramBuilder(RelDataType inputRowType,
RexBuilder rexBuilder)
Creates a program-builder.
|
RexSlot(String name,
int index,
RelDataType type)
Creates a slot.
|
RexVariable(String name,
RelDataType type) |
| Constructor and Description |
|---|
RexChecker(List<RelDataType> inputTypeList,
boolean fail)
Creates a RexChecker with a given set of input fields.
|
| Modifier and Type | Method and Description |
|---|---|
RelDataType |
AggregateFunction.getReturnType(RelDataTypeFactory typeFactory)
Returns the return type of this function, constructed using the given
type factory.
|
RelDataType |
ScalarFunction.getReturnType(RelDataTypeFactory typeFactory)
Returns the return type of this function, constructed using the given
type factory.
|
RelDataType |
Table.getRowType(RelDataTypeFactory typeFactory)
Returns this table's row type.
|
RelDataType |
TableFunction.getRowType(RelDataTypeFactory typeFactory,
List<Object> arguments)
Returns the record type of the table yielded by this function when
applied to given arguments.
|
RelDataType |
Member.getType()
Returns the type of this function's result.
|
RelDataType |
FunctionParameter.getType(RelDataTypeFactory typeFactory)
Returns the type of this parameter.
|
| Modifier and Type | Method and Description |
|---|---|
T |
TableFactory.create(SchemaPlus schema,
String name,
Map<String,Object> operand,
RelDataType rowType)
Creates a Table.
|
| Modifier and Type | Method and Description |
|---|---|
static CalciteSchema.FunctionEntry |
Schemas.resolve(RelDataTypeFactory typeFactory,
String name,
Collection<CalciteSchema.FunctionEntry> functionEntries,
List<RelDataType> argumentTypes) |
| Modifier and Type | Method and Description |
|---|---|
RelDataType |
AggregateFunctionImpl.getReturnType(RelDataTypeFactory typeFactory) |
RelDataType |
ScalarFunctionImpl.getReturnType(RelDataTypeFactory typeFactory) |
RelDataType |
StarTable.getRowType(RelDataTypeFactory typeFactory) |
RelDataType |
ViewTable.getRowType(RelDataTypeFactory typeFactory) |
RelDataType |
TableFunctionImpl.getRowType(RelDataTypeFactory typeFactory,
List<Object> arguments) |
| Modifier and Type | Method and Description |
|---|---|
protected RelDataType |
SqlBinaryOperator.adjustType(SqlValidator validator,
SqlCall call,
RelDataType type) |
protected RelDataType |
SqlPrefixOperator.adjustType(SqlValidator validator,
SqlCall call,
RelDataType type) |
protected RelDataType |
SqlOperator.adjustType(SqlValidator validator,
SqlCall call,
RelDataType type)
Validates and determines coercibility and resulting collation name of
binary operator if needed.
|
protected RelDataType |
SqlPostfixOperator.adjustType(SqlValidator validator,
SqlCall call,
RelDataType type) |
static RelDataType |
SqlUtil.createNlsStringType(RelDataTypeFactory typeFactory,
NlsString str)
Creates the type of an
NlsString. |
RelDataType |
SqlNumericLiteral.createSqlType(RelDataTypeFactory typeFactory) |
RelDataType |
SqlDateLiteral.createSqlType(RelDataTypeFactory typeFactory) |
RelDataType |
SqlLiteral.createSqlType(RelDataTypeFactory typeFactory) |
RelDataType |
SqlDataTypeSpec.deriveType(RelDataTypeFactory typeFactory)
Does not throw an error if the type is not built-in.
|
RelDataType |
SqlDataTypeSpec.deriveType(SqlValidator validator)
Throws an error if the type is not built-in.
|
RelDataType |
SqlAsOperator.deriveType(SqlValidator validator,
SqlValidatorScope scope,
SqlCall call) |
RelDataType |
SqlInternalOperator.deriveType(SqlValidator validator,
SqlValidatorScope scope,
SqlCall call) |
RelDataType |
SqlBinaryOperator.deriveType(SqlValidator validator,
SqlValidatorScope scope,
SqlCall call) |
RelDataType |
SqlOperator.deriveType(SqlValidator validator,
SqlValidatorScope scope,
SqlCall call)
Derives the type of a call to this operator.
|
RelDataType |
SqlFunction.deriveType(SqlValidator validator,
SqlValidatorScope scope,
SqlCall call) |
RelDataType |
SqlJdbcFunctionCall.deriveType(SqlValidator validator,
SqlValidatorScope scope,
SqlCall call) |
RelDataType |
SqlOverOperator.deriveType(SqlValidator validator,
SqlValidatorScope scope,
SqlCall call) |
RelDataType |
SqlCallBinding.getCursorOperand(int ordinal) |
RelDataType |
SqlOperatorBinding.getCursorOperand(int ordinal)
Returns the rowtype of the
ordinalth operand, which is a
cursor. |
RelDataType |
SqlCallBinding.getOperandType(int ordinal) |
RelDataType |
ExplicitOperatorBinding.getOperandType(int ordinal) |
abstract RelDataType |
SqlOperatorBinding.getOperandType(int ordinal)
Gets the type of a bound operand.
|
RelDataType |
SqlRankFunction.getReturnType(RelDataTypeFactory typeFactory) |
RelDataType |
SqlOperator.inferReturnType(RelDataTypeFactory typeFactory,
List<RelDataType> operandTypes)
Infers the type of a call to this operator with a given set of operand
types.
|
RelDataType |
SqlUnnestOperator.inferReturnType(SqlOperatorBinding opBinding) |
RelDataType |
SqlUnresolvedFunction.inferReturnType(SqlOperatorBinding opBinding)
Infers the return type of an invocation of this operator; only called
after the number and types of operands have already been validated.
|
RelDataType |
SqlOperator.inferReturnType(SqlOperatorBinding opBinding)
Infers the return type of an invocation of this operator; only called
after the number and types of operands have already been validated.
|
RelDataType |
SqlJdbcFunctionCall.inferReturnType(SqlOperatorBinding opBinding) |
RelDataType |
SqlOperator.validateOperands(SqlValidator validator,
SqlValidatorScope scope,
SqlCall call)
Validates the operands of a call, inferring the return type in the
process.
|
| Modifier and Type | Method and Description |
|---|---|
List<RelDataType> |
SqlOperatorBinding.collectOperandTypes()
Collects the types of the bound operands into a list.
|
List<RelDataType> |
SqlRankFunction.getParameterTypes(RelDataTypeFactory typeFactory) |
List<RelDataType> |
SqlFunction.getParamTypes() |
| Modifier and Type | Method and Description |
|---|---|
protected RelDataType |
SqlBinaryOperator.adjustType(SqlValidator validator,
SqlCall call,
RelDataType type) |
protected RelDataType |
SqlPrefixOperator.adjustType(SqlValidator validator,
SqlCall call,
RelDataType type) |
protected RelDataType |
SqlOperator.adjustType(SqlValidator validator,
SqlCall call,
RelDataType type)
Validates and determines coercibility and resulting collation name of
binary operator if needed.
|
protected RelDataType |
SqlPostfixOperator.adjustType(SqlValidator validator,
SqlCall call,
RelDataType type) |
| Modifier and Type | Method and Description |
|---|---|
RelDataType |
SqlOperator.inferReturnType(RelDataTypeFactory typeFactory,
List<RelDataType> operandTypes)
Infers the type of a call to this operator with a given set of operand
types.
|
static SqlFunction |
SqlUtil.lookupRoutine(SqlOperatorTable opTab,
SqlIdentifier funcName,
List<RelDataType> argTypes,
SqlFunctionCategory category)
Looks up a (possibly overloaded) routine based on name and argument
types.
|
static List<SqlFunction> |
SqlUtil.lookupSubjectRoutines(SqlOperatorTable opTab,
SqlIdentifier funcName,
List<RelDataType> argTypes,
SqlFunctionCategory category)
Looks up all subject routines matching the given name and argument types.
|
static boolean |
SqlUtil.matchRoutinesByParameterCount(SqlOperatorTable opTab,
SqlIdentifier funcName,
List<RelDataType> argTypes,
SqlFunctionCategory category)
Determine if there is a routine matching the given name and number of
arguments.
|
| Constructor and Description |
|---|
ExplicitOperatorBinding(RelDataTypeFactory typeFactory,
SqlOperator operator,
List<RelDataType> types) |
ExplicitOperatorBinding(SqlOperatorBinding delegate,
List<RelDataType> types) |
SqlFunction(SqlIdentifier sqlIdentifier,
SqlReturnTypeInference returnTypeInference,
SqlOperandTypeInference operandTypeInference,
SqlOperandTypeChecker operandTypeChecker,
List<RelDataType> paramTypes,
SqlFunctionCategory funcType)
Creates a placeholder SqlFunction for an invocation of a function with a
possibly qualified name.
|
SqlFunction(String name,
SqlIdentifier sqlIdentifier,
SqlKind kind,
SqlReturnTypeInference returnTypeInference,
SqlOperandTypeInference operandTypeInference,
SqlOperandTypeChecker operandTypeChecker,
List<RelDataType> paramTypes,
SqlFunctionCategory category)
Internal constructor.
|
SqlUnresolvedFunction(SqlIdentifier sqlIdentifier,
SqlReturnTypeInference returnTypeInference,
SqlOperandTypeInference operandTypeInference,
SqlOperandTypeChecker operandTypeChecker,
List<RelDataType> paramTypes,
SqlFunctionCategory funcType)
Creates a placeholder SqlUnresolvedFunction for an invocation of a function
with a possibly qualified name.
|
| Modifier and Type | Method and Description |
|---|---|
RelDataType |
SqlAdvisorValidator.deriveType(SqlValidatorScope scope,
SqlNode operand)
Calls the parent class method and mask Farrago exception thrown.
|
RelDataType |
SqlAdvisorGetHintsFunction.getRowType(RelDataTypeFactory typeFactory,
List<Object> arguments) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
SqlAdvisorValidator.validateFrom(SqlNode node,
RelDataType targetRowType,
SqlValidatorScope scope) |
| Modifier and Type | Field and Description |
|---|---|
List<RelDataType> |
SqlMinMaxAggFunction.argTypes |
| Modifier and Type | Method and Description |
|---|---|
protected RelDataType |
SqlMultisetValueConstructor.getComponentType(RelDataTypeFactory typeFactory,
List<RelDataType> argTypes) |
| Constructor and Description |
|---|
SqlAvgAggFunction(RelDataType type,
SqlAvgAggFunction.Subtype subtype)
Creates a SqlAvgAggFunction
|
SqlCovarAggFunction(RelDataType type,
SqlCovarAggFunction.Subtype subtype)
Creates a SqlCovarAggFunction.
|
SqlHistogramAggFunction(RelDataType type) |
SqlSingleValueAggFunction(RelDataType type) |
SqlSumAggFunction(RelDataType type) |
| Constructor and Description |
|---|
SqlMinMaxAggFunction(List<RelDataType> argTypes,
boolean isMin,
int kind) |
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractSqlType
Abstract base class for SQL implementations of
RelDataType. |
class |
ArraySqlType
SQL array type.
|
class |
BasicSqlType
BasicSqlType represents a standard atomic SQL type (excluding interval
types).
|
class |
IntervalSqlType
IntervalSqlType represents a standard SQL datetime interval type.
|
class |
MapSqlType
SQL map type.
|
class |
MultisetSqlType
MultisetSqlType represents a standard SQL2003 multiset type.
|
class |
ObjectSqlType
ObjectSqlType represents an SQL structured user-defined type.
|
| Modifier and Type | Method and Description |
|---|---|
static RelDataType |
SqlTypeUtil.addCharsetAndCollation(RelDataType type,
RelDataTypeFactory typeFactory)
Adds collation and charset to a character type, returns other types
unchanged.
|
protected RelDataType |
SqlTypeFactoryImpl.canonize(RelDataType type) |
static RelDataType |
SqlTypeUtil.createArrayType(RelDataTypeFactory typeFactory,
RelDataType type,
boolean nullable) |
RelDataType |
SqlTypeFactoryImpl.createArrayType(RelDataType elementType,
long maxCardinality) |
static RelDataType |
SqlTypeUtil.createEmptyStructType(RelDataTypeFactory typeFactory)
Records a struct type with no fields.
|
static RelDataType |
SqlTypeUtil.createMapType(RelDataTypeFactory typeFactory,
RelDataType keyType,
RelDataType valueType,
boolean nullable) |
RelDataType |
SqlTypeFactoryImpl.createMapType(RelDataType keyType,
RelDataType valueType) |
static RelDataType |
SqlTypeUtil.createMultisetType(RelDataTypeFactory typeFactory,
RelDataType type,
boolean nullable) |
RelDataType |
SqlTypeFactoryImpl.createMultisetType(RelDataType type,
long maxCardinality) |
RelDataType |
SqlTypeFactoryImpl.createSqlIntervalType(SqlIntervalQualifier intervalQualifier) |
RelDataType |
SqlTypeFactoryImpl.createSqlType(SqlTypeName typeName) |
RelDataType |
SqlTypeFactoryImpl.createSqlType(SqlTypeName typeName,
int precision) |
RelDataType |
SqlTypeFactoryImpl.createSqlType(SqlTypeName typeName,
int precision,
int scale) |
RelDataType |
SqlTypeFactoryImpl.createTypeWithCharsetAndCollation(RelDataType type,
Charset charset,
SqlCollation collation) |
RelDataType |
SqlTypeFactoryImpl.createTypeWithNullability(RelDataType type,
boolean nullable) |
static RelDataType |
SqlTypeUtil.flattenRecordType(RelDataTypeFactory typeFactory,
RelDataType recordType,
int[] flatteningMap)
Flattens a record type by recursively expanding any fields which are
themselves record types.
|
RelDataType |
MultisetSqlType.getComponentType() |
RelDataType |
ArraySqlType.getComponentType() |
RelDataType |
MapSqlType.getKeyType() |
RelDataType |
MapSqlType.getValueType() |
RelDataType |
ExplicitReturnTypeInference.inferReturnType(SqlOperatorBinding opBinding) |
RelDataType |
SqlReturnTypeInferenceChain.inferReturnType(SqlOperatorBinding opBinding) |
RelDataType |
SqlTypeTransformCascade.inferReturnType(SqlOperatorBinding opBinding) |
RelDataType |
TableFunctionReturnTypeInference.inferReturnType(SqlOperatorBinding opBinding) |
RelDataType |
CursorReturnTypeInference.inferReturnType(SqlOperatorBinding opBinding) |
RelDataType |
OrdinalReturnTypeInference.inferReturnType(SqlOperatorBinding opBinding) |
RelDataType |
MatchReturnTypeInference.inferReturnType(SqlOperatorBinding opBinding) |
RelDataType |
SqlReturnTypeInference.inferReturnType(SqlOperatorBinding opBinding)
Infers the return type of a call to an
SqlOperator. |
RelDataType |
SqlTypeFactoryImpl.leastRestrictive(List<RelDataType> types) |
static RelDataType |
SqlTypeUtil.makeNullableIfOperandsAre(RelDataTypeFactory typeFactory,
List<RelDataType> argTypes,
RelDataType type)
Recreates a given RelDataType with nullability iff any of the param
argTypes are nullable.
|
static RelDataType |
SqlTypeUtil.makeNullableIfOperandsAre(SqlValidator validator,
SqlValidatorScope scope,
SqlCall call,
RelDataType type)
Recreates a given RelDataType with nullability iff any of the operands
of a call are nullable.
|
static RelDataType |
SqlTypeUtil.promoteToRowType(RelDataTypeFactory typeFactory,
RelDataType type,
String fieldName)
Promotes a type to a row type (does nothing if it already is one).
|
RelDataType |
SqlTypeTransform.transformType(SqlOperatorBinding opBinding,
RelDataType typeToTransform)
Transforms a type.
|
| Modifier and Type | Method and Description |
|---|---|
static List<RelDataType> |
SqlTypeUtil.deriveAndCollectTypes(SqlValidator validator,
SqlValidatorScope scope,
List<SqlNode> operands)
Iterates over all operands, derives their types, and collects them into
a list.
|
static List<RelDataType> |
SqlTypeUtil.projectTypes(RelDataType rowType,
List<? extends Number> requiredFields)
Selects data types of the specified fields from an input row type.
|
| Modifier and Type | Method and Description |
|---|---|
static RelDataType |
SqlTypeUtil.addCharsetAndCollation(RelDataType type,
RelDataTypeFactory typeFactory)
Adds collation and charset to a character type, returns other types
unchanged.
|
static boolean |
SqlTypeUtil.areCharacterSetsMismatched(RelDataType t1,
RelDataType t2)
Determines whether two types both have different character sets.
|
static boolean |
SqlTypeUtil.canAssignFrom(RelDataType toType,
RelDataType fromType)
Tests whether a value can be assigned to a site.
|
static boolean |
SqlTypeUtil.canCastFrom(RelDataType toType,
RelDataType fromType,
boolean coerce)
Compares two types and returns true if fromType can be cast to toType.
|
protected RelDataType |
SqlTypeFactoryImpl.canonize(RelDataType type) |
int |
SqlTypeExplicitPrecedenceList.compareTypePrecedence(RelDataType type1,
RelDataType type2) |
boolean |
SqlTypeFamily.contains(RelDataType type) |
static boolean |
SqlTypeUtil.containsNullable(RelDataType type)
Determines whether a type or any of its fields (if a structured type) are
nullable.
|
boolean |
SqlTypeExplicitPrecedenceList.containsType(RelDataType type) |
static SqlDataTypeSpec |
SqlTypeUtil.convertTypeToSpec(RelDataType type)
Converts an instance of RelDataType to an instance of SqlDataTypeSpec.
|
static RelDataType |
SqlTypeUtil.createArrayType(RelDataTypeFactory typeFactory,
RelDataType type,
boolean nullable) |
RelDataType |
SqlTypeFactoryImpl.createArrayType(RelDataType elementType,
long maxCardinality) |
static RelDataType |
SqlTypeUtil.createMapType(RelDataTypeFactory typeFactory,
RelDataType keyType,
RelDataType valueType,
boolean nullable) |
RelDataType |
SqlTypeFactoryImpl.createMapType(RelDataType keyType,
RelDataType valueType) |
static RelDataType |
SqlTypeUtil.createMultisetType(RelDataTypeFactory typeFactory,
RelDataType type,
boolean nullable) |
RelDataType |
SqlTypeFactoryImpl.createMultisetType(RelDataType type,
long maxCardinality) |
RelDataType |
SqlTypeFactoryImpl.createTypeWithCharsetAndCollation(RelDataType type,
Charset charset,
SqlCollation collation) |
RelDataType |
SqlTypeFactoryImpl.createTypeWithNullability(RelDataType type,
boolean nullable) |
static boolean |
SqlTypeUtil.equalSansNullability(RelDataTypeFactory factory,
RelDataType type1,
RelDataType type2)
Returns whether two types are equal, ignoring nullability.
|
static ExplicitReturnTypeInference |
ReturnTypes.explicit(RelDataType type)
Creates an inference rule which returns a copy of a given data type.
|
static int |
SqlTypeUtil.findField(RelDataType type,
String fieldName)
Returns the ordinal of a given field in a record type, or -1 if the field
is not found.
|
static RelDataType |
SqlTypeUtil.flattenRecordType(RelDataTypeFactory typeFactory,
RelDataType recordType,
int[] flatteningMap)
Flattens a record type by recursively expanding any fields which are
themselves record types.
|
static int |
SqlTypeUtil.getMaxByteSize(RelDataType type)
Computes the maximum number of bytes required to represent a value of a
type having user-defined precision.
|
static long |
SqlTypeUtil.getMaxValue(RelDataType type)
Determines the maximum unscaled value of a numeric type
|
static long |
SqlTypeUtil.getMinValue(RelDataType type)
Determines the minimum unscaled value of a numeric type
|
static String |
SqlTypeUtil.getNumericJavaClassName(RelDataType type) |
static String |
SqlTypeUtil.getPrimitiveWrapperJavaClassName(RelDataType type) |
static boolean |
SqlTypeUtil.inBooleanFamily(RelDataType type) |
static boolean |
SqlTypeUtil.inCharFamily(RelDataType type) |
static boolean |
SqlTypeUtil.inCharOrBinaryFamilies(RelDataType type) |
void |
ExplicitOperandTypeInference.inferOperandTypes(SqlCallBinding callBinding,
RelDataType returnType,
RelDataType[] operandTypes) |
void |
ExplicitOperandTypeInference.inferOperandTypes(SqlCallBinding callBinding,
RelDataType returnType,
RelDataType[] operandTypes) |
void |
SqlOperandTypeInference.inferOperandTypes(SqlCallBinding callBinding,
RelDataType returnType,
RelDataType[] operandTypes)
Infers any unknown operand types.
|
void |
SqlOperandTypeInference.inferOperandTypes(SqlCallBinding callBinding,
RelDataType returnType,
RelDataType[] operandTypes)
Infers any unknown operand types.
|
static boolean |
SqlTypeUtil.inSameFamily(RelDataType t1,
RelDataType t2) |
static boolean |
SqlTypeUtil.inSameFamilyOrNull(RelDataType t1,
RelDataType t2) |
static boolean |
SqlTypeUtil.isApproximateNumeric(RelDataType type) |
static boolean |
SqlTypeUtil.isBigint(RelDataType type) |
static boolean |
SqlTypeUtil.isBoundedVariableWidth(RelDataType type) |
static boolean |
SqlTypeUtil.isComparable(RelDataType type1,
RelDataType type2)
Returns whether two types are comparable.
|
static boolean |
SqlTypeUtil.isDatetime(RelDataType type) |
static boolean |
SqlTypeUtil.isDecimal(RelDataType type) |
static boolean |
SqlTypeUtil.isExactNumeric(RelDataType type) |
static boolean |
SqlTypeUtil.isFlat(RelDataType type)
Returns whether a type is flat.
|
static boolean |
SqlTypeUtil.isInterval(RelDataType type) |
static boolean |
SqlTypeUtil.isIntType(RelDataType type) |
static boolean |
SqlTypeUtil.isJavaPrimitive(RelDataType type) |
static boolean |
SqlTypeUtil.isLob(RelDataType type) |
static boolean |
SqlTypeUtil.isNumeric(RelDataType type) |
static boolean |
SqlTypeUtil.isOfSameTypeName(List<SqlTypeName> typeNames,
RelDataType type)
Returns true if any element in
typeNames matches
type.getSqlTypeName(). |
static boolean |
SqlTypeUtil.isOfSameTypeName(SqlTypeName typeName,
RelDataType type)
Returns typeName.equals(type.getSqlTypeName()).
|
static boolean |
SqlTypeUtil.isUnicode(RelDataType type)
Checks whether a type represents Unicode character data.
|
static RelDataType |
SqlTypeUtil.makeNullableIfOperandsAre(RelDataTypeFactory typeFactory,
List<RelDataType> argTypes,
RelDataType type)
Recreates a given RelDataType with nullability iff any of the param
argTypes are nullable.
|
static RelDataType |
SqlTypeUtil.makeNullableIfOperandsAre(SqlValidator validator,
SqlValidatorScope scope,
SqlCall call,
RelDataType type)
Recreates a given RelDataType with nullability iff any of the operands
of a call are nullable.
|
static long |
SqlTypeUtil.maxValue(RelDataType type)
Returns the maximum value of an integral type, as a long value
|
static boolean |
SqlTypeUtil.needsNullIndicator(RelDataType recordType) |
static List<RelDataType> |
SqlTypeUtil.projectTypes(RelDataType rowType,
List<? extends Number> requiredFields)
Selects data types of the specified fields from an input row type.
|
static RelDataType |
SqlTypeUtil.promoteToRowType(RelDataTypeFactory typeFactory,
RelDataType type,
String fieldName)
Promotes a type to a row type (does nothing if it already is one).
|
static boolean |
SqlTypeUtil.sameNamedType(RelDataType t1,
RelDataType t2)
Tests whether two types have the same name and structure, possibly with
differing modifiers.
|
RelDataType |
SqlTypeTransform.transformType(SqlOperatorBinding opBinding,
RelDataType typeToTransform)
Transforms a type.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
SqlTypeUtil.containsNullable(List<RelDataType> types)
Returns whether one or more of an array of types is nullable.
|
static SqlOperandTypeInference |
InferTypes.explicit(List<RelDataType> types)
Returns an
SqlOperandTypeInference that returns a given list of
types. |
static boolean |
SqlTypeUtil.isCharTypeComparable(List<RelDataType> argTypes)
Checks whether two types or more are char comparable.
|
RelDataType |
SqlTypeFactoryImpl.leastRestrictive(List<RelDataType> types) |
static RelDataType |
SqlTypeUtil.makeNullableIfOperandsAre(RelDataTypeFactory typeFactory,
List<RelDataType> argTypes,
RelDataType type)
Recreates a given RelDataType with nullability iff any of the param
argTypes are nullable.
|
| Constructor and Description |
|---|
ArraySqlType(RelDataType elementType,
boolean isNullable)
Creates an ArraySqlType.
|
MapSqlType(RelDataType keyType,
RelDataType valueType,
boolean isNullable)
Creates a MapSqlType.
|
MultisetSqlType(RelDataType elementType,
boolean isNullable)
Constructs a new MultisetSqlType.
|
| Constructor and Description |
|---|
AssignableOperandTypeChecker(List<RelDataType> paramTypes)
Instantiates this strategy with a specific set of parameter types.
|
| Modifier and Type | Field and Description |
|---|---|
protected RelDataType |
SqlValidatorImpl.unknownType |
| Modifier and Type | Method and Description |
|---|---|
protected RelDataType |
SqlValidatorImpl.createTargetRowType(SqlValidatorTable table,
SqlNodeList targetColumnList,
boolean append)
Derives a row-type for INSERT and UPDATE operations.
|
RelDataType |
SqlValidatorCatalogReader.createTypeFromProjection(RelDataType type,
List<String> columnNameList) |
static RelDataType |
SqlValidatorUtil.createTypeFromProjection(RelDataType type,
List<String> columnNameList,
RelDataTypeFactory typeFactory,
boolean caseSensitive,
boolean elideRecord) |
RelDataType |
SqlValidatorImpl.deriveConstructorType(SqlValidatorScope scope,
SqlCall call,
SqlFunction unresolvedConstructor,
SqlFunction resolvedConstructor,
List<RelDataType> argTypes) |
RelDataType |
SqlValidator.deriveConstructorType(SqlValidatorScope scope,
SqlCall call,
SqlFunction unresolvedConstructor,
SqlFunction resolvedConstructor,
List<RelDataType> argTypes)
Derives the type of a constructor.
|
RelDataType |
SqlValidatorImpl.deriveType(SqlValidatorScope scope,
SqlNode expr) |
RelDataType |
SqlValidator.deriveType(SqlValidatorScope scope,
SqlNode operand)
Derives the type of a node in a given scope.
|
protected RelDataType |
SqlValidatorImpl.getLogicalSourceRowType(RelDataType sourceRowType,
SqlInsert insert) |
protected RelDataType |
SqlValidatorImpl.getLogicalTargetRowType(RelDataType targetRowType,
SqlInsert insert) |
RelDataType |
SqlValidatorCatalogReader.getNamedType(SqlIdentifier typeName)
Finds a user-defined type with the given name, possibly qualified.
|
RelDataType |
DelegatingSqlValidatorCatalogReader.getNamedType(SqlIdentifier typeName) |
RelDataType |
SqlValidatorImpl.getParameterRowType(SqlNode sqlQuery) |
RelDataType |
SqlValidator.getParameterRowType(SqlNode sqlQuery)
Returns a record type that contains the name and type of each parameter.
|
RelDataType |
SqlUserDefinedAggFunction.getReturnType(RelDataTypeFactory typeFactory) |
RelDataType |
SqlValidatorNamespace.getRowType()
Returns the row type of this namespace, which comprises a list of names
and types of the output columns.
|
RelDataType |
SqlValidatorTable.getRowType() |
RelDataType |
DelegatingNamespace.getRowType() |
RelDataType |
DelegatingSqlValidatorTable.getRowType() |
RelDataType |
SqlUserDefinedTableFunction.getRowType(RelDataTypeFactory typeFactory,
List<SqlNode> operandList)
Returns the record type of the table yielded by this function when
applied to given arguments.
|
RelDataType |
SqlValidatorNamespace.getRowTypeSansSystemColumns()
Returns the row type of this namespace, sans any system columns.
|
RelDataType |
DelegatingNamespace.getRowTypeSansSystemColumns() |
RelDataType |
SqlValidatorNamespace.getType()
Returns the type of this namespace.
|
RelDataType |
DelegatingNamespace.getType() |
RelDataType |
SqlValidatorImpl.getUnknownType() |
RelDataType |
SqlValidator.getUnknownType()
Returns an object representing the "unknown" type.
|
RelDataType |
SqlValidatorImpl.getValidatedNodeType(SqlNode node) |
RelDataType |
SqlValidator.getValidatedNodeType(SqlNode node)
Returns the type assigned to a node by validation.
|
RelDataType |
SqlValidatorImpl.getValidatedNodeTypeIfKnown(SqlNode node) |
RelDataType |
SqlValidator.getValidatedNodeTypeIfKnown(SqlNode node)
Returns the type assigned to a node by validation, or null if unknown.
|
RelDataType |
SqlValidatorScope.nullifyType(SqlNode node,
RelDataType type)
Converts the type of an expression to nullable, if the context
warrants it.
|
RelDataType |
DelegatingScope.nullifyType(SqlNode node,
RelDataType type) |
RelDataType |
AggregatingSelectScope.nullifyType(SqlNode node,
RelDataType type) |
RelDataType |
SqlValidatorScope.resolveColumn(String name,
SqlNode ctx)
Resolves a single identifier to a column, and returns the datatype of
that column.
|
RelDataType |
DelegatingScope.resolveColumn(String name,
SqlNode ctx) |
RelDataType |
OrderByScope.resolveColumn(String name,
SqlNode ctx) |
RelDataType |
ListScope.resolveColumn(String columnName,
SqlNode ctx) |
protected RelDataType |
TableConstructorNamespace.validateImpl() |
protected RelDataType |
WithNamespace.validateImpl() |
RelDataType |
ProcedureNamespace.validateImpl() |
RelDataType |
IdentifierNamespace.validateImpl() |
RelDataType |
SetopNamespace.validateImpl() |
protected RelDataType |
AliasNamespace.validateImpl() |
RelDataType |
SelectNamespace.validateImpl() |
protected RelDataType |
CollectNamespace.validateImpl() |
protected RelDataType |
SqlValidatorImpl.validateSelectList(SqlNodeList selectItems,
SqlSelect select,
RelDataType targetRowType) |
| Modifier and Type | Method and Description |
|---|---|
List<RelDataType> |
SqlUserDefinedAggFunction.getParameterTypes(RelDataTypeFactory typeFactory) |
| Modifier and Type | Method and Description |
|---|---|
static void |
SqlValidatorUtil.checkCharsetAndCollateConsistentIfCharType(RelDataType type) |
protected void |
SqlValidatorImpl.checkTypeAssignment(RelDataType sourceRowType,
RelDataType targetRowType,
SqlNode query) |
RelDataType |
SqlValidatorCatalogReader.createTypeFromProjection(RelDataType type,
List<String> columnNameList) |
static RelDataType |
SqlValidatorUtil.createTypeFromProjection(RelDataType type,
List<String> columnNameList,
RelDataTypeFactory typeFactory,
boolean caseSensitive,
boolean elideRecord) |
static List<String> |
SqlValidatorUtil.deriveNaturalJoinColumnList(RelDataType leftRowType,
RelDataType rightRowType)
Derives the list of column names suitable for NATURAL JOIN.
|
RelDataTypeField |
SqlValidatorCatalogReader.field(RelDataType rowType,
String alias)
Finds a field with a given name, using the case-sensitivity of the current
session.
|
int |
SqlValidatorCatalogReader.fieldOrdinal(RelDataType rowType,
String alias)
Finds the ordinal of a field with a given name, using the case-sensitivity
of the current session.
|
protected RelDataType |
SqlValidatorImpl.getLogicalSourceRowType(RelDataType sourceRowType,
SqlInsert insert) |
protected RelDataType |
SqlValidatorImpl.getLogicalTargetRowType(RelDataType targetRowType,
SqlInsert insert) |
protected void |
SqlValidatorImpl.inferUnknownTypes(RelDataType inferredType,
SqlValidatorScope scope,
SqlNode node) |
static RelDataTypeField |
SqlValidatorUtil.lookupField(boolean caseSensitive,
boolean elideRecord,
RelDataType rowType,
String columnName)
Looks up a field with a given name, returning null if not found.
|
RelDataType |
SqlValidatorScope.nullifyType(SqlNode node,
RelDataType type)
Converts the type of an expression to nullable, if the context
warrants it.
|
RelDataType |
DelegatingScope.nullifyType(SqlNode node,
RelDataType type) |
RelDataType |
AggregatingSelectScope.nullifyType(SqlNode node,
RelDataType type) |
void |
SqlValidatorNamespace.setType(RelDataType type)
Sets the type of this namespace.
|
void |
DelegatingNamespace.setType(RelDataType type) |
void |
SqlValidatorImpl.setValidatedNodeType(SqlNode node,
RelDataType type) |
void |
SqlValidator.setValidatedNodeType(SqlNode node,
RelDataType type)
Deprecated.
This method should not be in the
SqlValidator
interface. The validator should drive the type-derivation process, and
store nodes' types when they have been derived. |
protected void |
SqlValidatorImpl.validateFrom(SqlNode node,
RelDataType targetRowType,
SqlValidatorScope scope)
Validates the FROM clause of a query, or (recursively) a child node of
the FROM clause: AS, OVER, JOIN, VALUES, or subquery.
|
protected void |
SqlValidatorImpl.validateSelect(SqlSelect select,
RelDataType targetRowType)
Validates a SELECT statement.
|
protected RelDataType |
SqlValidatorImpl.validateSelectList(SqlNodeList selectItems,
SqlSelect select,
RelDataType targetRowType) |
protected void |
SqlValidatorImpl.validateValues(SqlCall node,
RelDataType targetRowType,
SqlValidatorScope scope)
Validates a VALUES clause.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
SqlValidatorImpl.addToSelectList(List<SqlNode> list,
Set<String> aliases,
List<Map.Entry<String,RelDataType>> fieldList,
SqlNode exp,
SqlValidatorScope scope,
boolean includeSystemVars)
Adds an expression to a select list, ensuring that its alias does not
clash with any existing expressions on the list.
|
RelDataType |
SqlValidatorImpl.deriveConstructorType(SqlValidatorScope scope,
SqlCall call,
SqlFunction unresolvedConstructor,
SqlFunction resolvedConstructor,
List<RelDataType> argTypes) |
RelDataType |
SqlValidator.deriveConstructorType(SqlValidatorScope scope,
SqlCall call,
SqlFunction unresolvedConstructor,
SqlFunction resolvedConstructor,
List<RelDataType> argTypes)
Derives the type of a constructor.
|
CalciteException |
SqlValidatorImpl.handleUnresolvedFunction(SqlCall call,
SqlFunction unresolvedFunction,
List<RelDataType> argTypes) |
CalciteException |
SqlValidator.handleUnresolvedFunction(SqlCall call,
SqlFunction unresolvedFunction,
List<RelDataType> argTypes)
Handles a call to a function which cannot be resolved.
|
void |
SqlValidatorImpl.validateColumnListParams(SqlFunction function,
List<RelDataType> argTypes,
List<SqlNode> operands) |
void |
SqlValidator.validateColumnListParams(SqlFunction function,
List<RelDataType> argTypes,
List<SqlNode> operands)
Validates a COLUMN_LIST parameter
|
SqlNode |
SqlValidatorImpl.validateParameterizedExpression(SqlNode topNode,
Map<String,RelDataType> nameToTypeMap) |
SqlNode |
SqlValidator.validateParameterizedExpression(SqlNode topNode,
Map<String,RelDataType> nameToTypeMap)
Validates an expression tree.
|
| Constructor and Description |
|---|
ParameterScope(SqlValidatorImpl validator,
Map<String,RelDataType> nameToTypeMap) |
SqlUserDefinedFunction(SqlIdentifier opName,
SqlReturnTypeInference returnTypeInference,
SqlOperandTypeInference operandTypeInference,
SqlOperandTypeChecker operandTypeChecker,
List<RelDataType> paramTypes,
Function function) |
SqlUserDefinedTableFunction(SqlIdentifier opName,
SqlReturnTypeInference returnTypeInference,
SqlOperandTypeInference operandTypeInference,
SqlOperandTypeChecker operandTypeChecker,
List<RelDataType> paramTypes,
TableFunction function) |
| Modifier and Type | Method and Description |
|---|---|
RelDataType |
SqlToRelConverter.getDynamicParamType(int index)
Returns the type inferred for a dynamic parameter.
|
protected RelDataType |
SqlToRelConverter.uniquifyFields(RelDataType rowType) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
SqlToRelConverter.checkConvertedRowType(SqlNode query,
RelDataType convertedRowType) |
protected RelNode |
SqlToRelConverter.convertQueryRecursive(SqlNode query,
boolean top,
RelDataType targetRowType)
Recursively converts a query to a relational expression.
|
RelNode |
SqlToRelConverter.convertValues(SqlCall values,
RelDataType targetRowType)
Converts a SELECT statement's parse tree into a relational expression.
|
RexNode |
DefaultValueFactory.newAttributeInitializer(RelDataType type,
SqlFunction constructor,
int iAttribute,
List<RexNode> constructorArgs)
Creates an expression which evaluates to the initializer expression for a
particular attribute of a structured type.
|
protected RelDataType |
SqlToRelConverter.uniquifyFields(RelDataType rowType) |
Copyright © 2012–2015 The Apache Software Foundation. All rights reserved.