| Package | Description |
|---|---|
| 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.prepare |
Preparation of queries (parsing, planning and implementation).
|
| 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.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.
|
| org.apache.calcite.tools |
Provides utility classes.
|
| Constructor and Description |
|---|
JavaRecordType(List<RelDataTypeField> fields,
Class clazz) |
| Modifier and Type | Field and Description |
|---|---|
protected List<RelDataTypeField> |
RelOptUtil.RexInputConverter.destFields |
private Set<RelDataTypeField> |
RelOptUtil.InputFinder.extraFields |
private static com.google.common.base.Function<RelDataTypeField,RelDataType> |
RelOptUtil.GET_TYPE |
private List<RelDataTypeField> |
RelOptUtil.RexInputConverter.leftDestFields |
private List<RelDataTypeField> |
RelOptUtil.RexInputConverter.rightDestFields |
private List<RelDataTypeField> |
RelOptUtil.RexInputConverter.srcFields |
| Modifier and Type | Method and Description |
|---|---|
static List<RelDataTypeField> |
RelOptUtil.deduplicateColumns(List<RelDataTypeField> baseColumns,
List<RelDataTypeField> extendedColumns)
Returns the set of columns with unique names, with prior columns taking
precedence over columns that appear later in the list.
|
| Modifier and Type | Method and Description |
|---|---|
private void |
RelOptUtil.TypeDumper.acceptFields(List<RelDataTypeField> fields) |
static List<RelDataTypeField> |
RelOptUtil.deduplicateColumns(List<RelDataTypeField> baseColumns,
List<RelDataTypeField> extendedColumns)
Returns the set of columns with unique names, with prior columns taking
precedence over columns that appear later in the list.
|
static List<RelDataTypeField> |
RelOptUtil.deduplicateColumns(List<RelDataTypeField> baseColumns,
List<RelDataTypeField> extendedColumns)
Returns the set of columns with unique names, with prior columns taking
precedence over columns that appear later in the list.
|
RelOptTable |
RelOptTable.extend(List<RelDataTypeField> extendedFields)
Returns a table with the given extra fields.
|
RelOptTable |
RelOptAbstractTable.extend(List<RelDataTypeField> extendedFields) |
private static RexNode |
RelOptUtil.shiftFilter(int start,
int end,
int offset,
RexBuilder rexBuilder,
List<RelDataTypeField> joinFields,
int nTotalFields,
List<RelDataTypeField> rightFields,
RexNode filter) |
private static RexNode |
RelOptUtil.shiftFilter(int start,
int end,
int offset,
RexBuilder rexBuilder,
List<RelDataTypeField> joinFields,
int nTotalFields,
List<RelDataTypeField> rightFields,
RexNode filter) |
static RexNode |
RelOptUtil.splitJoinCondition(List<RelDataTypeField> sysFieldList,
List<RelNode> inputs,
RexNode condition,
List<List<RexNode>> joinKeys,
List<Integer> filterNulls,
List<SqlOperator> rangeOp)
Splits out the equi-join (and optionally, a single non-equi) components
of a join condition, and returns what's left.
|
private static void |
RelOptUtil.splitJoinCondition(List<RelDataTypeField> sysFieldList,
List<RelNode> inputs,
RexNode condition,
List<List<RexNode>> joinKeys,
List<Integer> filterNulls,
List<SqlOperator> rangeOp,
List<RexNode> nonEquiList) |
static RexNode |
RelOptUtil.splitJoinCondition(List<RelDataTypeField> sysFieldList,
RelNode leftRel,
RelNode rightRel,
RexNode condition,
List<RexNode> leftJoinKeys,
List<RexNode> rightJoinKeys,
List<Integer> filterNulls,
List<SqlOperator> rangeOp)
Splits out the equi-join (and optionally, a single non-equi) components
of a join condition, and returns what's left.
|
private static List<RexNode> |
MaterializedViewSubstitutionVisitor.transformRex(List<RexNode> nodes,
List<RelDataTypeField> oldFields,
List<RelDataTypeField> newFields) |
private static List<RexNode> |
MaterializedViewSubstitutionVisitor.transformRex(List<RexNode> nodes,
List<RelDataTypeField> oldFields,
List<RelDataTypeField> newFields) |
private static RexNode |
MaterializedViewSubstitutionVisitor.transformRex(RexNode node,
List<RelDataTypeField> oldFields,
List<RelDataTypeField> newFields) |
private static RexNode |
MaterializedViewSubstitutionVisitor.transformRex(RexNode node,
List<RelDataTypeField> oldFields,
List<RelDataTypeField> newFields) |
| Modifier and Type | Method and Description |
|---|---|
RelDataTypeField |
CalciteCatalogReader.field(RelDataType rowType,
String alias) |
| Modifier and Type | Method and Description |
|---|---|
RelOptTable |
Prepare.AbstractPreparingTable.extend(List<RelDataTypeField> extendedFields) |
| Modifier and Type | Method and Description |
|---|---|
List<RelDataTypeField> |
Join.getSystemFieldList()
Returns a list of system fields that will be prefixed to
output row type.
|
| Modifier and Type | Method and Description |
|---|---|
static RelDataType |
Join.createJoinType(RelDataTypeFactory typeFactory,
RelDataType leftType,
RelDataType rightType,
List<String> fieldNameList,
List<RelDataTypeField> systemFieldList)
Deprecated.
|
static RelDataType |
Join.deriveJoinRowType(RelDataType leftType,
RelDataType rightType,
JoinRelType joinType,
RelDataTypeFactory typeFactory,
List<String> fieldNameList,
List<RelDataTypeField> systemFieldList)
Deprecated.
|
RelNode |
TableScan.project(ImmutableBitSet fieldsUsed,
Set<RelDataTypeField> extraFields,
RelBuilder relBuilder)
Projects a subset of the fields of the table, and also asks for "extra"
fields that were not included in the table's official type.
|
| Modifier and Type | Method and Description |
|---|---|
private Object |
RelJson.toJson(RelDataTypeField node) |
| Modifier and Type | Field and Description |
|---|---|
private com.google.common.collect.ImmutableList<RelDataTypeField> |
LogicalJoin.systemFieldList |
| Modifier and Type | Method and Description |
|---|---|
List<RelDataTypeField> |
LogicalJoin.getSystemFieldList() |
| Modifier and Type | Method and Description |
|---|---|
static LogicalJoin |
LogicalJoin.create(RelNode left,
RelNode right,
RexNode condition,
JoinRelType joinType,
Set<String> variablesStopped,
boolean semiJoinDone,
com.google.common.collect.ImmutableList<RelDataTypeField> systemFieldList)
Deprecated.
|
static LogicalJoin |
LogicalJoin.create(RelNode left,
RelNode right,
RexNode condition,
Set<CorrelationId> variablesSet,
JoinRelType joinType,
boolean semiJoinDone,
com.google.common.collect.ImmutableList<RelDataTypeField> systemFieldList)
Creates a LogicalJoin, flagged with whether it has been translated to a
semi-join.
|
| Constructor and Description |
|---|
LogicalJoin(RelOptCluster cluster,
RelNode left,
RelNode right,
RexNode condition,
JoinRelType joinType,
Set<String> variablesStopped,
boolean semiJoinDone,
com.google.common.collect.ImmutableList<RelDataTypeField> systemFieldList)
Deprecated.
|
LogicalJoin(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode left,
RelNode right,
RexNode condition,
JoinRelType joinType,
Set<String> variablesStopped,
boolean semiJoinDone,
com.google.common.collect.ImmutableList<RelDataTypeField> systemFieldList)
Deprecated.
|
LogicalJoin(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode left,
RelNode right,
RexNode condition,
Set<CorrelationId> variablesSet,
JoinRelType joinType,
boolean semiJoinDone,
com.google.common.collect.ImmutableList<RelDataTypeField> systemFieldList)
Creates a LogicalJoin.
|
| Modifier and Type | Method and Description |
|---|---|
protected Double |
RelMdSize.averageFieldValueSize(RelDataTypeField field)
Estimates the average size (in bytes) of a value of a field, knowing
nothing more than its type.
|
| Modifier and Type | Field and Description |
|---|---|
(package private) List<RelDataTypeField> |
PushProjector.childFields
Fields from the RelNode that the projection is being pushed past
|
private List<RelDataTypeField> |
JoinCommuteRule.VariableReplacer.leftFields |
private List<RelDataTypeField> |
JoinCommuteRule.VariableReplacer.rightFields |
| Modifier and Type | Method and Description |
|---|---|
List<RelDataTypeField> |
LoptMultiJoin.getJoinFields(LoptJoinTree left,
LoptJoinTree right)
Retrieves the fields corresponding to a join between a left and right
tree
|
List<RelDataTypeField> |
LoptMultiJoin.getMultiJoinFields()
Returns array of fields contained within the multi-join
|
| Modifier and Type | Method and Description |
|---|---|
private RexNode |
LoptOptimizeJoinRule.adjustFilter(LoptMultiJoin multiJoin,
LoptJoinTree left,
LoptJoinTree right,
RexNode condition,
int factorAdded,
List<Integer> origJoinOrder,
List<RelDataTypeField> origFields)
Adjusts a filter to reflect a newly added factor in the middle of an
existing join tree
|
RexNode |
PushProjector.convertRefsAndExprs(RexNode rex,
List<RelDataTypeField> destFields,
int[] adjustments)
Clones an expression tree and walks through it, adjusting each
RexInputRef index by some amount, and converting expressions that need to
be preserved to field references.
|
private void |
JoinToMultiJoinRule.copyOuterJoinInfo(MultiJoin multiJoin,
List<Pair<JoinRelType,RexNode>> destJoinSpecs,
int adjustmentAmount,
List<RelDataTypeField> srcFields,
List<RelDataTypeField> destFields)
Copies outer join data from a source MultiJoin to a new set of arrays.
|
private void |
JoinToMultiJoinRule.copyOuterJoinInfo(MultiJoin multiJoin,
List<Pair<JoinRelType,RexNode>> destJoinSpecs,
int adjustmentAmount,
List<RelDataTypeField> srcFields,
List<RelDataTypeField> destFields)
Copies outer join data from a source MultiJoin to a new set of arrays.
|
protected void |
JoinProjectTransposeRule.createProjectExprs(Project projRel,
RelNode joinChild,
int adjustmentAmount,
RexBuilder rexBuilder,
List<RelDataTypeField> joinChildrenFields,
List<Pair<RexNode,String>> projects)
Creates projection expressions corresponding to one of the inputs into
the join
|
| Constructor and Description |
|---|
RefAndExprConverter(RexBuilder rexBuilder,
List<RelDataTypeField> srcFields,
List<RelDataTypeField> destFields,
int[] adjustments,
List<RexNode> preserveLeft,
int firstLeftRef,
List<RexNode> preserveRight,
int firstRightRef) |
RefAndExprConverter(RexBuilder rexBuilder,
List<RelDataTypeField> srcFields,
List<RelDataTypeField> destFields,
int[] adjustments,
List<RexNode> preserveLeft,
int firstLeftRef,
List<RexNode> preserveRight,
int firstRightRef) |
| Modifier and Type | Class and Description |
|---|---|
class |
RelDataTypeFieldImpl
Default implementation of
RelDataTypeField. |
| Modifier and Type | Field and Description |
|---|---|
(package private) RelDataTypeField |
RelDataTypeImpl.Slot.field |
| Modifier and Type | Field and Description |
|---|---|
protected List<RelDataTypeField> |
RelDataTypeImpl.fieldList |
private List<RelDataTypeField> |
RelRecordType.SerializableRelRecordType.fields |
private List<RelDataTypeField> |
RelDataTypeHolder.fields |
| Modifier and Type | Method and Description |
|---|---|
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.
|
RelDataTypeField |
DynamicRecordTypeImpl.getField(String fieldName,
boolean caseSensitive,
boolean elideRecord) |
RelDataTypeField |
RelDataTypeImpl.getField(String fieldName,
boolean caseSensitive,
boolean elideRecord) |
RelDataTypeField |
RelDataType.getField(String fieldName,
boolean caseSensitive,
boolean elideRecord)
Looks up a field by name.
|
| Modifier and Type | Method and Description |
|---|---|
List<RelDataTypeField> |
RelCrossType.getFieldList() |
List<RelDataTypeField> |
RelDataTypeHolder.getFieldList() |
List<RelDataTypeField> |
DynamicRecordTypeImpl.getFieldList() |
List<RelDataTypeField> |
RelDataTypeImpl.getFieldList() |
List<RelDataTypeField> |
RelDataType.getFieldList()
Gets the fields in a struct type.
|
private static List<RelDataTypeField> |
RelDataTypeFactoryImpl.getFieldList(List<RelDataType> types)
Returns a list of the fields in a list of types.
|
(package private) Pair<RelDataTypeField,Boolean> |
RelDataTypeHolder.getFieldOrInsert(String fieldName,
boolean caseSensitive)
Get field if exists, otherwise inserts a new field.
|
| Modifier and Type | Method and Description |
|---|---|
RelDataTypeFactory.FieldInfoBuilder |
RelDataTypeFactory.FieldInfoBuilder.add(RelDataTypeField field)
Deprecated.
|
RelDataTypeFactory.Builder |
RelDataTypeFactory.Builder.add(RelDataTypeField field)
Adds a field.
|
Integer |
RelDataTypeField.ToFieldIndex.apply(RelDataTypeField o) |
String |
RelDataTypeField.ToFieldName.apply(RelDataTypeField o) |
| Modifier and Type | Method and Description |
|---|---|
private static void |
RelDataTypeFactoryImpl.addFields(RelDataType type,
List<RelDataTypeField> fieldList)
Adds all fields in
type to fieldList,
renumbering the fields (if necessary) to ensure that their index
matches their position in the list. |
| Constructor and Description |
|---|
RelCrossType(List<RelDataType> types,
List<RelDataTypeField> fields)
Creates a cartesian product type.
|
RelDataTypeImpl(List<? extends RelDataTypeField> fieldList)
Creates a RelDataTypeImpl.
|
RelRecordType(List<RelDataTypeField> fields) |
RelRecordType(StructKind kind,
List<RelDataTypeField> fields)
Creates a
RecordType. |
SerializableRelRecordType(List<RelDataTypeField> fields) |
| Modifier and Type | Field and Description |
|---|---|
private RelDataTypeField |
RexFieldAccess.field |
| Modifier and Type | Field and Description |
|---|---|
private com.google.common.collect.ImmutableList<RelDataTypeField> |
RexPermuteInputsShuttle.fields |
private static com.google.common.base.Function<RelDataTypeField,RexInputRef> |
RexBuilder.TO_INPUT_REF |
| Modifier and Type | Method and Description |
|---|---|
RelDataTypeField |
RexFieldAccess.getField() |
| Modifier and Type | Method and Description |
|---|---|
private static com.google.common.collect.ImmutableList<RelDataTypeField> |
RexPermuteInputsShuttle.fields(RelNode[] inputs) |
| Modifier and Type | Method and Description |
|---|---|
private RexNode |
RexBuilder.makeFieldAccessInternal(RexNode expr,
RelDataTypeField field)
Creates an expression accessing a given field from a record.
|
| Modifier and Type | Method and Description |
|---|---|
private static int |
RexPermuteInputsShuttle.lookup(List<RelDataTypeField> fields,
String name) |
static RexInputRef |
RexInputRef.of(int index,
List<RelDataTypeField> fields)
Creates a reference to a given field in a list of fields.
|
static Pair<RexNode,String> |
RexInputRef.of2(int index,
List<RelDataTypeField> fields)
Creates a reference to a given field in a list of fields.
|
| Constructor and Description |
|---|
RexFieldAccess(RexNode expr,
RelDataTypeField field) |
| Constructor and Description |
|---|
RexPermuteInputsShuttle(Mappings.TargetMapping mapping,
com.google.common.collect.ImmutableList<RelDataTypeField> fields) |
| Modifier and Type | Method and Description |
|---|---|
List<Pair<RelDataTypeField,List<String>>> |
CustomColumnResolvingTable.resolveColumn(RelDataType rowType,
RelDataTypeFactory typeFactory,
List<String> names)
Resolve a column based on the name components.
|
| Modifier and Type | Method and Description |
|---|---|
Table |
ExtensibleTable.extend(List<RelDataTypeField> fields)
Returns a table that has the row type of this table plus the given
fields.
|
| Modifier and Type | Method and Description |
|---|---|
ModifiableViewTable |
ModifiableViewTable.extend(List<RelDataTypeField> extendedColumns,
RelDataTypeFactory typeFactory)
Extends the underlying table and returns a new view with updated row-type
and column-mapping.
|
private static ImmutableIntList |
ModifiableViewTable.getNewColumnMapping(Table underlying,
ImmutableIntList oldColumnMapping,
List<RelDataTypeField> extendedColumns,
RelDataTypeFactory typeFactory)
Creates a mapping from the view index to the index in the underlying table.
|
| Modifier and Type | Method and Description |
|---|---|
private static boolean |
SqlInOperator.anyNullable(List<RelDataTypeField> fieldList) |
| Modifier and Type | Method and Description |
|---|---|
private void |
TableFunctionReturnTypeInference.addOutputColumn(List<String> expandedFieldNames,
List<RelDataType> expandedOutputTypes,
int iInputColumn,
int iCursor,
SqlOperatorBinding opBinding,
RelDataTypeField cursorField) |
| Modifier and Type | Method and Description |
|---|---|
private static boolean |
SqlTypeUtil.flattenFields(RelDataTypeFactory typeFactory,
RelDataType type,
List<RelDataTypeField> list,
int[] flatteningMap) |
| Constructor and Description |
|---|
AbstractSqlType(SqlTypeName typeName,
boolean isNullable,
List<? extends RelDataTypeField> fields)
Creates an AbstractSqlType.
|
ObjectSqlType(SqlTypeName typeName,
SqlIdentifier sqlIdentifier,
boolean nullable,
List<? extends RelDataTypeField> fields,
RelDataTypeComparability comparability)
Constructs an object type.
|
| Modifier and Type | Field and Description |
|---|---|
com.google.common.collect.ImmutableList<RelDataTypeField> |
TableNamespace.extendedFields |
| Modifier and Type | Method and Description |
|---|---|
RelDataTypeField |
SqlNameMatchers.BaseMatcher.field(RelDataType rowType,
String fieldName) |
RelDataTypeField |
SqlValidatorCatalogReader.field(RelDataType rowType,
String alias)
|
RelDataTypeField |
SqlNameMatcher.field(RelDataType rowType,
String fieldName)
Finds a field with a given name, using the current case-sensitivity,
returning null if not found.
|
static RelDataTypeField |
SqlValidatorUtil.getTargetField(RelDataType rowType,
RelDataTypeFactory typeFactory,
SqlIdentifier id,
SqlValidatorCatalogReader catalogReader,
RelOptTable table)
Resolve a target column name in the target table.
|
static RelDataTypeField |
SqlValidatorUtil.lookupField(boolean caseSensitive,
RelDataType rowType,
String columnName)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
static List<RelDataTypeField> |
SqlValidatorUtil.getExtendedColumns(RelDataTypeFactory typeFactory,
SqlValidatorTable table,
SqlNodeList extendedColumns)
Gets a list of extended columns with field indices to the underlying table.
|
static com.google.common.collect.ImmutableMap<Integer,RelDataTypeField> |
SqlValidatorUtil.getIndexToFieldMap(List<RelDataTypeField> sourceFields,
RelDataType targetFields)
Gets a map of indexes from the source to fields in the target for the
intersecting set of source and target fields.
|
| Modifier and Type | Method and Description |
|---|---|
private boolean |
SqlValidatorImpl.addOrExpandField(List<SqlNode> selectItems,
Set<String> aliases,
List<Map.Entry<String,RelDataType>> types,
boolean includeSystemVars,
SelectScope scope,
SqlIdentifier id,
RelDataTypeField field) |
private boolean |
DelegatingScope.hasAmbiguousUnresolvedStar(RelDataType rowType,
RelDataTypeField field,
String columnName)
Returns whether
rowType contains more than one star column. |
boolean |
SqlValidator.isSystemField(RelDataTypeField field)
Returns whether a field is a system field.
|
boolean |
SqlValidatorImpl.isSystemField(RelDataTypeField field) |
| Modifier and Type | Method and Description |
|---|---|
private static void |
SqlValidatorUtil.addFields(List<RelDataTypeField> fieldList,
List<RelDataType> typeList,
List<String> nameList,
Set<String> uniqueNames) |
static RelDataType |
SqlValidatorUtil.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 |
SqlValidatorUtil.deriveJoinRowType(RelDataType leftType,
RelDataType rightType,
JoinRelType joinType,
RelDataTypeFactory typeFactory,
List<String> fieldNameList,
List<RelDataTypeField> systemFieldList)
Derives the type of a join relational expression.
|
static com.google.common.collect.ImmutableMap<Integer,RelDataTypeField> |
SqlValidatorUtil.getIndexToFieldMap(List<RelDataTypeField> sourceFields,
RelDataType targetFields)
Gets a map of indexes from the source to fields in the target for the
intersecting set of source and target fields.
|
static ImmutableBitSet |
SqlValidatorUtil.getOrdinalBitSet(RelDataType sourceRowType,
Map<Integer,RelDataTypeField> indexToField)
Gets the bit-set to the column ordinals in the source for columns that
intersect in the target.
|
private static RelOptTable |
SqlValidatorUtil.getRelOptTable(TableNamespace tableNamespace,
Prepare.CatalogReader catalogReader,
String datasetName,
boolean[] usedDataset,
List<RelDataTypeField> extendedFields) |
static Map<String,Integer> |
SqlValidatorUtil.mapNameToIndex(List<RelDataTypeField> fields)
Returns a map from field names to indexes.
|
| Constructor and Description |
|---|
TableNamespace(SqlValidatorImpl validator,
SqlValidatorTable table,
List<RelDataTypeField> fields)
Creates a TableNamespace.
|
| Modifier and Type | Field and Description |
|---|---|
private List<RelDataTypeField> |
SqlToRelConverter.Blackboard.systemFieldList |
| Modifier and Type | Method and Description |
|---|---|
(package private) RelDataTypeField |
SqlToRelConverter.Blackboard.getRootField(RexInputRef inputRef) |
| Modifier and Type | Method and Description |
|---|---|
protected List<RelDataTypeField> |
SqlToRelConverter.getSystemFields()
Returns a list of fields to be prefixed to each relational expression.
|
| Modifier and Type | Method and Description |
|---|---|
(package private) List<RelDataTypeField> |
RelBuilder.Frame.fields() |
| Constructor and Description |
|---|
Field(com.google.common.collect.ImmutableSet<String> left,
RelDataTypeField right) |
Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.