| Package | Description |
|---|---|
| org.apache.calcite.adapter.elasticsearch |
Base classes for a query provider based on an Elasticsearch DB.
|
| org.apache.calcite.adapter.enumerable |
Query optimizer rules for Java calling convention.
|
| 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.materialize |
Management of materialized query results.
|
| 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 |
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.mutable |
Defines mutable relational expressions.
|
| org.apache.calcite.rel.rel2sql |
Translates a relational expression to SQL parse tree.
|
| org.apache.calcite.rel.rules |
Provides a core set of planner rules.
|
| 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.sql2rel |
Translates a SQL parse tree to relational expression.
|
| org.apache.calcite.tools |
Provides utility classes.
|
| Modifier and Type | Method and Description |
|---|---|
Sort |
ElasticsearchSort.copy(RelTraitSet traitSet,
RelNode relNode,
RelCollation relCollation,
RexNode offset,
RexNode fetch) |
Filter |
ElasticsearchFilter.copy(RelTraitSet relTraitSet,
RelNode input,
RexNode condition) |
private List<Map<String,Object>> |
ElasticsearchFilter.Translator.translateAnd(RexNode node0)
Translates a condition that may be an AND of other conditions.
|
private boolean |
ElasticsearchFilter.Translator.translateBinary2(String op,
RexNode left,
RexNode right)
Translates a call to a binary operator.
|
private String |
ElasticsearchFilter.Translator.translateMatch(RexNode condition) |
private Void |
ElasticsearchFilter.Translator.translateMatch2(RexNode node) |
private Object |
ElasticsearchFilter.Translator.translateOr(RexNode condition) |
| Modifier and Type | Method and Description |
|---|---|
Project |
ElasticsearchProject.copy(RelTraitSet relTraitSet,
RelNode input,
List<RexNode> projects,
RelDataType relDataType) |
(package private) List<String> |
ElasticsearchRules.RexToElasticsearchTranslator.visitList(List<RexNode> list) |
| Constructor and Description |
|---|
ElasticsearchFilter(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode child,
RexNode condition) |
ElasticsearchSort(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode child,
RelCollation collation,
RexNode offset,
RexNode fetch) |
| Constructor and Description |
|---|
ElasticsearchProject(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode input,
List<? extends RexNode> projects,
RelDataType rowType) |
| Modifier and Type | Field and Description |
|---|---|
RexNode |
EnumerableLimit.fetch |
RexNode |
EnumerableLimit.offset |
| Modifier and Type | Field and Description |
|---|---|
private Map<? extends RexNode,Boolean> |
RexToLixTranslator.exprNullableMap |
private List<Map<RexNode,Boolean>> |
NestedBlockBuilderImpl.nullables |
private static com.google.common.base.Function<RexNode,Type> |
EnumUtils.REX_TO_INTERNAL_TYPE |
| Modifier and Type | Method and Description |
|---|---|
RexNode |
RexToLixTranslator.deref(RexNode expr)
Dereferences an expression if it is a
RexLocalRef. |
RexNode |
AggAddContext.rexFilterArgument()
Returns
RexNode representation of the
filter, or null. |
| Modifier and Type | Method and Description |
|---|---|
Map<RexNode,Boolean> |
NestedBlockBuilder.currentNullables()
Returns the current nullability state of rex nodes.
|
Map<RexNode,Boolean> |
NestedBlockBuilderImpl.currentNullables()
Returns the current nullability state of rex nodes.
|
private static List<RexNode> |
RexImpTable.harmonize(RexToLixTranslator translator,
List<RexNode> operands)
Ensures that operands have identical type.
|
List<RexNode> |
AggAddContext.rexArguments()
Returns
RexNode representation of arguments. |
List<RexNode> |
WinAggResultContext.rexArguments()
Returns
RexNode representation of arguments. |
| Modifier and Type | Method and Description |
|---|---|
EnumerableTableFunctionScan |
EnumerableTableFunctionScan.copy(RelTraitSet traitSet,
List<RelNode> inputs,
RexNode rexCall,
Type elementType,
RelDataType rowType,
Set<RelColumnMapping> columnMappings) |
EnumerableSort |
EnumerableSort.copy(RelTraitSet traitSet,
RelNode newInput,
RelCollation newCollation,
RexNode offset,
RexNode fetch) |
EnumerableFilter |
EnumerableFilter.copy(RelTraitSet traitSet,
RelNode input,
RexNode condition) |
SemiJoin |
EnumerableSemiJoin.copy(RelTraitSet traitSet,
RexNode condition,
RelNode left,
RelNode right,
JoinRelType joinType,
boolean semiJoinDone) |
EnumerableJoin |
EnumerableJoin.copy(RelTraitSet traitSet,
RexNode condition,
RelNode left,
RelNode right,
JoinRelType joinType,
boolean semiJoinDone) |
EnumerableThetaJoin |
EnumerableThetaJoin.copy(RelTraitSet traitSet,
RexNode condition,
RelNode left,
RelNode right,
JoinRelType joinType,
boolean semiJoinDone) |
EnumerableMergeJoin |
EnumerableMergeJoin.copy(RelTraitSet traitSet,
RexNode condition,
RelNode left,
RelNode right,
JoinRelType joinType,
boolean semiJoinDone) |
static EnumerableSort |
EnumerableSort.create(RelNode child,
RelCollation collation,
RexNode offset,
RexNode fetch)
Creates an EnumerableSort.
|
static EnumerableSemiJoin |
EnumerableSemiJoin.create(RelNode left,
RelNode right,
RexNode condition,
ImmutableIntList leftKeys,
ImmutableIntList rightKeys)
Creates an EnumerableSemiJoin.
|
static EnumerableJoin |
EnumerableJoin.create(RelNode left,
RelNode right,
RexNode condition,
ImmutableIntList leftKeys,
ImmutableIntList rightKeys,
JoinRelType joinType,
Set<String> variablesStopped)
Deprecated.
|
static EnumerableJoin |
EnumerableJoin.create(RelNode left,
RelNode right,
RexNode condition,
ImmutableIntList leftKeys,
ImmutableIntList rightKeys,
Set<CorrelationId> variablesSet,
JoinRelType joinType)
Creates an EnumerableJoin.
|
static EnumerableFilter |
EnumerableFilter.create(RelNode input,
RexNode condition)
Creates an EnumerableFilter.
|
static EnumerableLimit |
EnumerableLimit.create(RelNode input,
RexNode offset,
RexNode fetch)
Creates an EnumerableLimit.
|
RexNode |
RexToLixTranslator.deref(RexNode expr)
Dereferences an expression if it is a
RexLocalRef. |
private static Expression |
EnumerableLimit.getExpression(RexNode offset) |
protected Boolean |
RexToLixTranslator.isKnownNullable(RexNode node)
Walks parent translator chain and verifies if the expression is nullable.
|
boolean |
RexToLixTranslator.isNullable(RexNode e)
Returns whether an expression is nullable.
|
(package private) Expression |
EnumerableThetaJoin.predicate(EnumerableRelImplementor implementor,
BlockBuilder builder,
PhysType leftPhysType,
PhysType rightPhysType,
RexNode condition) |
RexToLixTranslator |
RexToLixTranslator.setNullable(RexNode e,
boolean nullable)
Creates a read-only copy of this translator that records that a given
expression is nullable.
|
(package private) Expression |
RexToLixTranslator.translate(RexNode expr) |
(package private) Expression |
RexToLixTranslator.translate(RexNode expr,
RexImpTable.NullAs nullAs) |
(package private) Expression |
RexToLixTranslator.translate(RexNode expr,
RexImpTable.NullAs nullAs,
Type storageType) |
(package private) Expression |
RexToLixTranslator.translate(RexNode expr,
Type storageType) |
private Expression |
RexToLixTranslator.translate0(RexNode expr,
RexImpTable.NullAs nullAs,
Type storageType)
Translates an expression that is not in the cache.
|
| Modifier and Type | Method and Description |
|---|---|
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 an EnumerableProject, specifying row type rather than field
names.
|
(package private) static List<RelDataType> |
EnumUtils.fieldRowTypes(RelDataType inputRowType,
List<? extends RexNode> extraInputs,
List<Integer> argList) |
private static List<RexNode> |
RexImpTable.harmonize(RexToLixTranslator translator,
List<RexNode> operands)
Ensures that operands have identical type.
|
private void |
EnumerableWindow.implementAdd(List<AggImpState> aggs,
BlockBuilder builder7,
com.google.common.base.Function<BlockBuilder,WinAggFrameResultContext> frame,
com.google.common.base.Function<AggImpState,List<RexNode>> rexArguments,
DeclarationStatement jDecl) |
private boolean |
EnumerableWindow.implementResult(List<AggImpState> aggs,
BlockBuilder builder,
com.google.common.base.Function<BlockBuilder,WinAggFrameResultContext> frame,
com.google.common.base.Function<AggImpState,List<RexNode>> rexArguments,
boolean cachedBlock) |
(package private) static List<Type> |
EnumUtils.internalTypes(List<? extends RexNode> operandList) |
void |
NestedBlockBuilder.nestBlock(BlockBuilder block,
Map<RexNode,Boolean> nullables)
Uses given block as the new code context and the map of nullability.
|
void |
NestedBlockBuilderImpl.nestBlock(BlockBuilder block,
Map<RexNode,Boolean> nullables)
Uses given block as the new code context and the map of nullability.
|
RexToLixTranslator |
RexToLixTranslator.setNullable(Map<? extends RexNode,Boolean> nullable)
Creates a read-only copy of this translator that records that a given
expression is nullable.
|
Expression |
RexToLixTranslator.translateConstructor(List<RexNode> operandList,
SqlKind kind) |
List<Expression> |
RexToLixTranslator.translateList(List<? extends RexNode> operandList)
Translates the list of
RexNode, using the default output types. |
List<Expression> |
RexToLixTranslator.translateList(List<? extends RexNode> operandList,
List<? extends Type> storageTypes)
Translates the list of
RexNode, while optimizing for output
storage. |
List<Expression> |
RexToLixTranslator.translateList(List<RexNode> operandList,
RexImpTable.NullAs nullAs) |
List<Expression> |
RexToLixTranslator.translateList(List<RexNode> operandList,
RexImpTable.NullAs nullAs,
List<? extends Type> storageTypes) |
| Constructor and Description |
|---|
EnumerableFilter(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode child,
RexNode condition)
Creates an EnumerableFilter.
|
EnumerableJoin(RelOptCluster cluster,
RelTraitSet traits,
RelNode left,
RelNode right,
RexNode condition,
ImmutableIntList leftKeys,
ImmutableIntList rightKeys,
JoinRelType joinType,
Set<String> variablesStopped)
Deprecated.
|
EnumerableJoin(RelOptCluster cluster,
RelTraitSet traits,
RelNode left,
RelNode right,
RexNode condition,
ImmutableIntList leftKeys,
ImmutableIntList rightKeys,
Set<CorrelationId> variablesSet,
JoinRelType joinType)
Creates an EnumerableJoin.
|
EnumerableLimit(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode input,
RexNode offset,
RexNode fetch)
Creates an EnumerableLimit.
|
EnumerableMergeJoin(RelOptCluster cluster,
RelTraitSet traits,
RelNode left,
RelNode right,
RexNode condition,
ImmutableIntList leftKeys,
ImmutableIntList rightKeys,
JoinRelType joinType,
Set<String> variablesStopped)
Deprecated.
|
EnumerableMergeJoin(RelOptCluster cluster,
RelTraitSet traits,
RelNode left,
RelNode right,
RexNode condition,
ImmutableIntList leftKeys,
ImmutableIntList rightKeys,
Set<CorrelationId> variablesSet,
JoinRelType joinType) |
EnumerableSemiJoin(RelOptCluster cluster,
RelTraitSet traits,
RelNode left,
RelNode right,
RexNode condition,
ImmutableIntList leftKeys,
ImmutableIntList rightKeys)
Creates an EnumerableSemiJoin.
|
EnumerableSort(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode input,
RelCollation collation,
RexNode offset,
RexNode fetch)
Creates an EnumerableSort.
|
EnumerableTableFunctionScan(RelOptCluster cluster,
RelTraitSet traits,
List<RelNode> inputs,
Type elementType,
RelDataType rowType,
RexNode call,
Set<RelColumnMapping> columnMappings) |
EnumerableThetaJoin(RelOptCluster cluster,
RelTraitSet traits,
RelNode left,
RelNode right,
RexNode condition,
JoinRelType joinType,
Set<String> variablesStopped)
Deprecated.
|
EnumerableThetaJoin(RelOptCluster cluster,
RelTraitSet traits,
RelNode left,
RelNode right,
RexNode condition,
Set<CorrelationId> variablesSet,
JoinRelType joinType)
Creates an EnumerableThetaJoin.
|
| Modifier and Type | Method and Description |
|---|---|
private boolean |
JdbcRules.JdbcJoinRule.canJoinOnCondition(RexNode node)
Returns whether a condition is supported by
JdbcRules.JdbcJoin. |
JdbcRules.JdbcSort |
JdbcRules.JdbcSort.copy(RelTraitSet traitSet,
RelNode newInput,
RelCollation newCollation,
RexNode offset,
RexNode fetch) |
JdbcRules.JdbcFilter |
JdbcRules.JdbcFilter.copy(RelTraitSet traitSet,
RelNode input,
RexNode condition) |
JdbcRules.JdbcJoin |
JdbcRules.JdbcJoin.copy(RelTraitSet traitSet,
RexNode condition,
RelNode left,
RelNode right,
JoinRelType joinType,
boolean semiJoinDone) |
| Modifier and Type | Method and Description |
|---|---|
JdbcRules.JdbcProject |
JdbcRules.JdbcProject.copy(RelTraitSet traitSet,
RelNode input,
List<RexNode> projects,
RelDataType rowType) |
TableModify |
JdbcTable.toModificationRel(RelOptCluster cluster,
RelOptTable table,
Prepare.CatalogReader catalogReader,
RelNode input,
TableModify.Operation operation,
List<String> updateColumnList,
List<RexNode> sourceExpressionList,
boolean flattened) |
| Constructor and Description |
|---|
JdbcFilter(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode input,
RexNode condition) |
JdbcJoin(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode left,
RelNode right,
RexNode condition,
JoinRelType joinType,
Set<String> variablesStopped)
Deprecated.
|
JdbcJoin(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode left,
RelNode right,
RexNode condition,
Set<CorrelationId> variablesSet,
JoinRelType joinType)
Creates a JdbcJoin.
|
JdbcSort(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode input,
RelCollation collation,
RexNode offset,
RexNode fetch) |
| Constructor and Description |
|---|
JdbcProject(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode input,
List<? extends RexNode> projects,
RelDataType rowType) |
JdbcProject(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode input,
List<RexNode> projects,
RelDataType rowType,
int flags)
Deprecated.
|
JdbcTableModify(RelOptCluster cluster,
RelTraitSet traitSet,
RelOptTable table,
Prepare.CatalogReader catalogReader,
RelNode input,
TableModify.Operation operation,
List<String> updateColumnList,
List<RexNode> sourceExpressionList,
boolean flattened) |
| Modifier and Type | Field and Description |
|---|---|
com.google.common.collect.ImmutableList<RexNode> |
Bindables.BindableTableScan.filters |
| Modifier and Type | Method and Description |
|---|---|
Bindables.BindableSort |
Bindables.BindableSort.copy(RelTraitSet traitSet,
RelNode newInput,
RelCollation newCollation,
RexNode offset,
RexNode fetch) |
Bindables.BindableFilter |
Bindables.BindableFilter.copy(RelTraitSet traitSet,
RelNode input,
RexNode condition) |
Bindables.BindableJoin |
Bindables.BindableJoin.copy(RelTraitSet traitSet,
RexNode conditionExpr,
RelNode left,
RelNode right,
JoinRelType joinType,
boolean semiJoinDone) |
static Bindables.BindableFilter |
Bindables.BindableFilter.create(RelNode input,
RexNode condition)
Creates a BindableFilter.
|
| Modifier and Type | Method and Description |
|---|---|
Scalar |
JaninoRexCompiler.compile(List<RexNode> nodes,
RelDataType inputRowType) |
Scalar |
Compiler.compile(List<RexNode> nodes,
RelDataType inputRowType)
Compiles an expression to an executable form.
|
Scalar |
Interpreter.FooCompiler.compile(List<RexNode> nodes,
RelDataType inputRowType) |
Scalar |
Interpreter.CompilerImpl.compile(List<RexNode> nodes,
RelDataType inputRowType) |
Scalar |
Interpreter.ScalarCompiler.compile(List<RexNode> nodes,
RelDataType inputRowType) |
Bindables.BindableProject |
Bindables.BindableProject.copy(RelTraitSet traitSet,
RelNode input,
List<RexNode> projects,
RelDataType rowType) |
(package private) static TableScanNode |
TableScanNode.create(Compiler compiler,
TableScan rel,
com.google.common.collect.ImmutableList<RexNode> filters,
ImmutableIntList projects)
Creates a TableScanNode.
|
static Bindables.BindableTableScan |
Bindables.BindableTableScan.create(RelOptCluster cluster,
RelOptTable relOptTable,
List<RexNode> filters,
List<Integer> projects)
Creates a BindableTableScan.
|
private static TableScanNode |
TableScanNode.createEnumerable(Compiler compiler,
TableScan rel,
Enumerable<Row> enumerable,
ImmutableIntList acceptedProjects,
List<RexNode> rejectedFilters,
ImmutableIntList rejectedProjects) |
private static TableScanNode |
TableScanNode.createFilterable(Compiler compiler,
TableScan rel,
com.google.common.collect.ImmutableList<RexNode> filters,
ImmutableIntList projects,
FilterableTable filterableTable) |
private static TableScanNode |
TableScanNode.createProjectableFilterable(Compiler compiler,
TableScan rel,
com.google.common.collect.ImmutableList<RexNode> filters,
ImmutableIntList projects,
ProjectableFilterableTable pfTable) |
private static TableScanNode |
TableScanNode.createQueryable(Compiler compiler,
TableScan rel,
com.google.common.collect.ImmutableList<RexNode> filters,
ImmutableIntList projects,
QueryableTable queryableTable) |
private static TableScanNode |
TableScanNode.createScannable(Compiler compiler,
TableScan rel,
com.google.common.collect.ImmutableList<RexNode> filters,
ImmutableIntList projects,
ScannableTable scannableTable) |
| Constructor and Description |
|---|
BindableFilter(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode input,
RexNode condition) |
BindableJoin(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode left,
RelNode right,
RexNode condition,
JoinRelType joinType,
Set<String> variablesStopped)
Deprecated.
|
BindableJoin(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode left,
RelNode right,
RexNode condition,
Set<CorrelationId> variablesSet,
JoinRelType joinType)
Creates a BindableJoin.
|
BindableSort(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode input,
RelCollation collation,
RexNode offset,
RexNode fetch) |
| Constructor and Description |
|---|
BindableProject(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode input,
List<? extends RexNode> projects,
RelDataType rowType) |
BindableTableScan(RelOptCluster cluster,
RelTraitSet traitSet,
RelOptTable table,
com.google.common.collect.ImmutableList<RexNode> filters,
ImmutableIntList projects)
Creates a BindableTableScan.
|
| Modifier and Type | Field and Description |
|---|---|
RexNode |
CalcitePrepare.AnalyzeViewResult.constraint |
| Constructor and Description |
|---|
AnalyzeViewResult(CalcitePrepareImpl prepare,
SqlValidator validator,
String sql,
SqlNode sqlNode,
RelDataType rowType,
RelRoot root,
Table table,
com.google.common.collect.ImmutableList<String> tablePath,
RexNode constraint,
ImmutableIntList columnMapping,
boolean modifiable) |
| Modifier and Type | Method and Description |
|---|---|
private static int[][] |
Lattice.grab(List<RelNode> leaves,
RexNode rex)
Converts an "t1.c1 = t2.c2" expression into two (input, field) pairs.
|
private static int[] |
Lattice.inputField(List<RelNode> leaves,
RexNode rex)
Converts an expression into an (input, field) pair.
|
| Modifier and Type | Field and Description |
|---|---|
(package private) RexNode |
RelOptMaterialization.ProjectFilterTable.condition |
private RexNode |
RelOptCluster.originalExpression |
| Modifier and Type | Field and Description |
|---|---|
com.google.common.collect.ImmutableMap<RexNode,RexNode> |
RelOptPredicateList.constantMap
A map of each (e, constant) pair that occurs within
RelOptPredicateList.pulledUpPredicates. |
com.google.common.collect.ImmutableMap<RexNode,RexNode> |
RelOptPredicateList.constantMap
A map of each (e, constant) pair that occurs within
RelOptPredicateList.pulledUpPredicates. |
private static com.google.common.collect.ImmutableList<RexNode> |
RelOptPredicateList.EMPTY_LIST |
com.google.common.collect.ImmutableList<RexNode> |
RelOptPredicateList.leftInferredPredicates
Predicates that were inferred from the right input.
|
com.google.common.collect.ImmutableList<RexNode> |
RelOptPredicateList.pulledUpPredicates
Predicates that can be pulled up from the relational expression and its
inputs.
|
com.google.common.collect.ImmutableList<RexNode> |
RelOptPredicateList.rightInferredPredicates
Predicates that were inferred from the left input.
|
(package private) Map<RexInputRef,RexImplicationChecker.InputRefUsage<SqlOperator,RexNode>> |
RexImplicationChecker.InputUsageFinder.usageMap |
| Modifier and Type | Method and Description |
|---|---|
static RexNode |
RelOptUtil.andJoinFilters(RexBuilder rexBuilder,
RexNode left,
RexNode right)
Ands two sets of join filters together, either of which can be null.
|
private static RexNode |
SubstitutionVisitor.canonizeNode(RexBuilder rexBuilder,
RexNode condition)
Reorders some of the operands in this expression so structural comparison,
i.e., based on string representation, can be more precise.
|
static RexNode |
RelOptUtil.createEquiJoinCondition(RelNode left,
List<Integer> leftKeys,
RelNode right,
List<Integer> rightKeys,
RexBuilder rexBuilder)
Builds an equi-join condition from a set of left and right keys.
|
RexNode |
RelOptCluster.getOriginalExpression()
Deprecated.
|
static RexNode |
RelOptUtil.isDistinctFrom(RexBuilder rexBuilder,
RexNode x,
RexNode y,
boolean neg)
Returns a translation of the
IS DISTINCT FROM (or IS
NOT DISTINCT FROM) sql operator. |
private static RexNode |
RelOptUtil.isDistinctFromInternal(RexBuilder rexBuilder,
RexNode x,
RexNode y,
boolean neg) |
private static RexNode |
RelOptUtil.pushDownEqualJoinConditions(RexNode node,
int leftCount,
int rightCount,
List<RexNode> extraLeftExprs,
List<RexNode> extraRightExprs)
Pushes down parts of a join condition.
|
static RexNode |
RelOptUtil.pushFilterPastProject(RexNode filter,
Project projRel)
Deprecated.
|
static RexNode |
RelOptUtil.pushPastProject(RexNode node,
Project project)
Converts an expression that is based on the output fields of a
Project to an equivalent expression on the Project's
input fields. |
private static RexNode |
VisitorDataContext.removeCast(RexNode inputRef) |
private static RexNode |
RexImplicationChecker.InputUsageFinder.removeCast(RexNode inputRef) |
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.splitCorrelatedFilterCondition(LogicalFilter filter,
List<RexInputRef> joinKeys,
List<RexNode> correlatedJoinKeys)
Deprecated.
|
static RexNode |
RelOptUtil.splitCorrelatedFilterCondition(LogicalFilter filter,
List<RexNode> joinKeys,
List<RexNode> correlatedJoinKeys,
boolean extractCorrelatedFieldAccess) |
static RexNode |
SubstitutionVisitor.splitFilter(RexSimplify simplify,
RexNode condition,
RexNode target)
Maps a condition onto a target.
|
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.
|
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.
|
static RexNode |
RelOptUtil.splitJoinCondition(RelNode left,
RelNode right,
RexNode condition,
List<Integer> leftKeys,
List<Integer> rightKeys,
List<Boolean> filterNulls)
Splits out the equi-join components of a join condition, and returns
what's left.
|
private static RexNode |
SubstitutionVisitor.splitOr(RexBuilder rexBuilder,
RexNode condition,
RexNode target) |
private static RexNode |
MaterializedViewSubstitutionVisitor.transformRex(RexNode node,
List<RelDataTypeField> oldFields,
List<RelDataTypeField> newFields) |
RexNode |
RelOptUtil.VariableUsedVisitor.visitCorrelVariable(RexCorrelVariable p) |
RexNode |
RelOptUtil.VariableUsedVisitor.visitFieldAccess(RexFieldAccess fieldAccess) |
RexNode |
RelOptUtil.InputReferencedVisitor.visitInputRef(RexInputRef inputRef) |
RexNode |
RelOptUtil.RexInputConverter.visitInputRef(RexInputRef var) |
RexNode |
RelOptUtil.VariableUsedVisitor.visitSubQuery(RexSubQuery subQuery) |
| Modifier and Type | Method and Description |
|---|---|
static List<RexNode> |
RelOptUtil.conjunctions(RexNode rexPredicate)
Returns a condition decomposed by AND.
|
static List<RexNode> |
RelOptUtil.createSwappedJoinExprs(RelNode newJoin,
Join origJoin,
boolean origOrder)
Creates projection expressions reflecting the swapping of a join's input.
|
static List<RexNode> |
RelOptUtil.disjunctions(RexNode rexPredicate)
Returns a condition decomposed by OR.
|
static Map<Integer,RexNode> |
RelOptUtil.getColumnConstraints(ModifiableView modifiableViewTable,
RelDataType targetRowType,
RelDataTypeFactory typeFactory)
Returns a mapping of the column ordinal in the underlying table to a column
constraint of the modifiable view.
|
private RexImplicationChecker.InputRefUsage<SqlOperator,RexNode> |
RexImplicationChecker.InputUsageFinder.getUsageMap(RexInputRef rex) |
static List<RexNode> |
RelOptUtil.pushPastProject(List<? extends RexNode> nodes,
Project project)
Converts a list of expressions that are based on the output fields of a
Project to equivalent expressions on the Project's
input fields. |
private static List<RexNode> |
MaterializedViewSubstitutionVisitor.transformRex(List<RexNode> nodes,
List<RelDataTypeField> oldFields,
List<RelDataTypeField> newFields) |
| Modifier and Type | Method and Description |
|---|---|
private static void |
RelOptUtil.addJoinKey(List<RexNode> joinKeyList,
RexNode key,
boolean preserveLastElementInList) |
static RelOptUtil.InputFinder |
RelOptUtil.InputFinder.analyze(RexNode node)
Returns an input finder that has analyzed a given expression.
|
static RexNode |
RelOptUtil.andJoinFilters(RexBuilder rexBuilder,
RexNode left,
RexNode right)
Ands two sets of join filters together, either of which can be null.
|
static ImmutableBitSet |
RelOptUtil.InputFinder.bits(List<RexNode> exprs,
RexNode expr)
Returns a bit set describing the inputs used by a collection of
project expressions and an optional condition.
|
static ImmutableBitSet |
RelOptUtil.InputFinder.bits(RexNode node)
Returns a bit set describing the inputs used by an expression.
|
private static RexNode |
SubstitutionVisitor.canonizeNode(RexBuilder rexBuilder,
RexNode condition)
Reorders some of the operands in this expression so structural comparison,
i.e., based on string representation, can be more precise.
|
static List<RexNode> |
RelOptUtil.conjunctions(RexNode rexPredicate)
Returns a condition decomposed by AND.
|
private static boolean |
RelOptUtil.containsGet(RexNode node) |
static RelNode |
RelOptUtil.createFilter(RelNode child,
RexNode condition)
Deprecated.
|
static RelNode |
RelOptUtil.createFilter(RelNode child,
RexNode condition,
RelFactories.FilterFactory filterFactory)
Deprecated.
|
static void |
RelOptUtil.decomposeConjunction(RexNode rexPredicate,
List<RexNode> rexList)
Decomposes a predicate into a list of expressions that are AND'ed
together.
|
static void |
RelOptUtil.decomposeConjunction(RexNode rexPredicate,
List<RexNode> rexList,
List<RexNode> notList)
Decomposes a predicate into a list of expressions that are AND'ed
together, and a list of expressions that are preceded by NOT.
|
static void |
RelOptUtil.decomposeDisjunction(RexNode rexPredicate,
List<RexNode> rexList)
Decomposes a predicate into a list of expressions that are OR'ed
together.
|
static List<RexNode> |
RelOptUtil.disjunctions(RexNode rexPredicate)
Returns a condition decomposed by OR.
|
static Pair<Integer,?> |
VisitorDataContext.getValue(RexNode inputRef,
RexNode literal) |
boolean |
RexImplicationChecker.implies(RexNode first,
RexNode second)
Checks if condition first implies (⇒) condition second.
|
private boolean |
RexImplicationChecker.implies2(RexNode first,
RexNode second)
Returns whether the predicate
first (not a conjunction)
implies second. |
private boolean |
RexImplicationChecker.impliesAny(RexNode first,
List<RexNode> seconds)
Returns whether the predicate
first implies (⇒)
at least one predicate in seconds. |
private boolean |
RexImplicationChecker.impliesConjunction(RexNode first,
RexNode second)
Returns whether the predicate
first implies second (both
may be conjunctions). |
static void |
RelOptUtil.inferViewPredicates(Map<Integer,RexNode> projectMap,
List<RexNode> filters,
RexNode constraint)
Decomposes the WHERE clause of a view into predicates that constraint
a column to a particular value.
|
static RexNode |
RelOptUtil.isDistinctFrom(RexBuilder rexBuilder,
RexNode x,
RexNode y,
boolean neg)
Returns a translation of the
IS DISTINCT FROM (or IS
NOT DISTINCT FROM) sql operator. |
private static RexNode |
RelOptUtil.isDistinctFromInternal(RexBuilder rexBuilder,
RexNode x,
RexNode y,
boolean neg) |
static boolean |
RelOptUtil.isEqui(RelNode left,
RelNode right,
RexNode condition)
Deprecated.
|
private static boolean |
SubstitutionVisitor.isEquivalent(RexBuilder rexBuilder,
RexNode condition,
RexNode target) |
boolean |
Strong.isNotTrue(RexNode node)
Returns whether an expression is definitely not true.
|
static boolean |
Strong.isNotTrue(RexNode node,
ImmutableBitSet nullColumns)
Returns whether the analyzed expression will definitely not return true
(equivalently, will definitely not return null or false) if
all of a given set of input columns are null.
|
boolean |
Strong.isNull(RexNode node)
Returns whether an expression is definitely null.
|
static boolean |
Strong.isNull(RexNode node,
ImmutableBitSet nullColumns)
Returns whether the analyzed expression will definitely return null if
all of a given set of input columns are null.
|
private boolean |
RexImplicationChecker.isSatisfiable(RexNode second,
DataContext dataValues) |
static boolean |
SubstitutionVisitor.mayBeSatisfiable(RexNode e)
Returns whether a boolean expression ever returns true.
|
static DataContext |
VisitorDataContext.of(RelDataType rowType,
RexNode rex) |
private static RelOptMaterialization.ProjectFilterTable |
RelOptMaterialization.ProjectFilterTable.of2(RexNode condition,
RelNode node) |
private static RelOptMaterialization.ProjectFilterTable |
RelOptMaterialization.ProjectFilterTable.of3(RexNode condition,
Mappings.TargetMapping mapping,
RelNode node) |
private static RexNode |
RelOptUtil.pushDownEqualJoinConditions(RexNode node,
int leftCount,
int rightCount,
List<RexNode> extraLeftExprs,
List<RexNode> extraRightExprs)
Pushes down parts of a join condition.
|
static RexNode |
RelOptUtil.pushFilterPastProject(RexNode filter,
Project projRel)
Deprecated.
|
static RexNode |
RelOptUtil.pushPastProject(RexNode node,
Project project)
Converts an expression that is based on the output fields of a
Project to an equivalent expression on the Project's
input fields. |
private static RexNode |
VisitorDataContext.removeCast(RexNode inputRef) |
private static RexNode |
RexImplicationChecker.InputUsageFinder.removeCast(RexNode inputRef) |
void |
RelOptCluster.setOriginalExpression(RexNode originalExpression)
Deprecated.
|
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 void |
RelOptUtil.splitCorrelatedFilterCondition(LogicalFilter filter,
RexNode condition,
List<RexInputRef> joinKeys,
List<RexNode> correlatedJoinKeys,
List<RexNode> nonEquiList) |
private static void |
RelOptUtil.splitCorrelatedFilterCondition(LogicalFilter filter,
RexNode condition,
List<RexNode> joinKeys,
List<RexNode> correlatedJoinKeys,
List<RexNode> nonEquiList,
boolean extractCorrelatedFieldAccess) |
static RexNode |
SubstitutionVisitor.splitFilter(RexSimplify simplify,
RexNode condition,
RexNode target)
Maps a condition onto a target.
|
static void |
RelOptUtil.splitFilters(ImmutableBitSet childBitmap,
RexNode predicate,
List<RexNode> pushable,
List<RexNode> notPushable)
Splits a filter into two lists, depending on whether or not the filter
only references its child input
|
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.
|
static RexNode |
RelOptUtil.splitJoinCondition(RelNode left,
RelNode right,
RexNode condition,
List<Integer> leftKeys,
List<Integer> rightKeys,
List<Boolean> filterNulls)
Splits out the equi-join components of a join condition, and returns
what's left.
|
private static void |
RelOptUtil.splitJoinCondition(RexBuilder rexBuilder,
int leftFieldCount,
RexNode condition,
List<Integer> leftKeys,
List<Integer> rightKeys,
List<Boolean> filterNulls,
List<RexNode> nonEquiList) |
private static RexNode |
SubstitutionVisitor.splitOr(RexBuilder rexBuilder,
RexNode condition,
RexNode target) |
private static RexNode |
MaterializedViewSubstitutionVisitor.transformRex(RexNode node,
List<RelDataTypeField> oldFields,
List<RelDataTypeField> newFields) |
private void |
RexImplicationChecker.InputUsageFinder.updateUsage(SqlOperator op,
RexInputRef inputRef,
RexNode literal) |
private boolean |
RexImplicationChecker.validate(RexNode first,
RexNode second) |
static void |
RelOptUtil.validateValueAgainstConstraint(SqlNode sourceValue,
RexNode targetConstraint,
com.google.common.base.Supplier<CalciteContextException> errorSupplier)
Ensures that a source value does not violate the constraint of the target
column.
|
| Modifier and Type | Method and Description |
|---|---|
private static void |
RelOptUtil.addJoinKey(List<RexNode> joinKeyList,
RexNode key,
boolean preserveLastElementInList) |
private boolean |
Strong.allNull(List<RexNode> operands)
Returns whether all expressions in a list are definitely null.
|
private boolean |
Strong.anyNull(List<RexNode> operands)
Returns whether any expressions in a list are definitely null.
|
static ImmutableBitSet |
RelOptUtil.InputFinder.bits(List<RexNode> exprs,
RexNode expr)
Returns a bit set describing the inputs used by a collection of
project expressions and an optional condition.
|
static boolean |
RelOptUtil.classifyFilters(RelNode joinRel,
List<RexNode> filters,
JoinRelType joinType,
boolean pushInto,
boolean pushLeft,
boolean pushRight,
List<RexNode> joinFilters,
List<RexNode> leftFilters,
List<RexNode> rightFilters)
Classifies filters according to where they should be processed.
|
static boolean |
RelOptUtil.classifyFilters(RelNode joinRel,
List<RexNode> filters,
JoinRelType joinType,
boolean pushInto,
boolean pushLeft,
boolean pushRight,
List<RexNode> joinFilters,
List<RexNode> leftFilters,
List<RexNode> rightFilters)
Classifies filters according to where they should be processed.
|
static boolean |
RelOptUtil.classifyFilters(RelNode joinRel,
List<RexNode> filters,
JoinRelType joinType,
boolean pushInto,
boolean pushLeft,
boolean pushRight,
List<RexNode> joinFilters,
List<RexNode> leftFilters,
List<RexNode> rightFilters)
Classifies filters according to where they should be processed.
|
static boolean |
RelOptUtil.classifyFilters(RelNode joinRel,
List<RexNode> filters,
JoinRelType joinType,
boolean pushInto,
boolean pushLeft,
boolean pushRight,
List<RexNode> joinFilters,
List<RexNode> leftFilters,
List<RexNode> rightFilters)
Classifies filters according to where they should be processed.
|
static RelNode |
RelOptUtil.createExistsPlan(RelOptCluster cluster,
RelNode seekRel,
List<RexNode> conditions,
RexLiteral extraExpr,
String extraName)
Deprecated.
|
static RelNode |
RelOptUtil.createFilter(RelNode child,
Iterable<? extends RexNode> conditions)
Creates a filter, using the default filter factory,
or returns the original relational expression if the
condition is trivial.
|
static RelNode |
RelOptUtil.createFilter(RelNode child,
Iterable<? extends RexNode> conditions,
RelFactories.FilterFactory filterFactory)
Creates a filter using the default factory,
or returns the original relational expression if the
condition is trivial.
|
static RelNode |
RelOptUtil.createProject(RelNode child,
List<? extends RexNode> exprList,
List<String> fieldNameList)
Creates a relational expression which projects a list of expressions.
|
static RelNode |
RelOptUtil.createProject(RelNode child,
List<? extends RexNode> exprs,
List<String> fieldNames,
boolean optimize)
Creates a relational expression which projects an array of expressions,
and optionally optimizes.
|
static RelNode |
RelOptUtil.createProject(RelNode child,
List<? extends RexNode> exprs,
List<String> fieldNames,
boolean optimize,
RelBuilder relBuilder)
Creates a relational expression which projects an array of expressions,
and optionally optimizes.
|
static RelNode |
RelOptUtil.createProject(RelNode child,
List<Pair<RexNode,String>> projectList,
boolean optimize)
Creates a relational expression which projects a list of (expression, name)
pairs.
|
static void |
RelOptUtil.decomposeConjunction(RexNode rexPredicate,
List<RexNode> rexList)
Decomposes a predicate into a list of expressions that are AND'ed
together.
|
static void |
RelOptUtil.decomposeConjunction(RexNode rexPredicate,
List<RexNode> rexList,
List<RexNode> notList)
Decomposes a predicate into a list of expressions that are AND'ed
together, and a list of expressions that are preceded by NOT.
|
static void |
RelOptUtil.decomposeConjunction(RexNode rexPredicate,
List<RexNode> rexList,
List<RexNode> notList)
Decomposes a predicate into a list of expressions that are AND'ed
together, and a list of expressions that are preceded by NOT.
|
static void |
RelOptUtil.decomposeDisjunction(RexNode rexPredicate,
List<RexNode> rexList)
Decomposes a predicate into a list of expressions that are OR'ed
together.
|
private static void |
RelOptUtil.fix(List<RexNode> operands,
int before,
int after) |
private boolean |
RexImplicationChecker.impliesAny(RexNode first,
List<RexNode> seconds)
Returns whether the predicate
first implies (⇒)
at least one predicate in seconds. |
static void |
RelOptUtil.inferViewPredicates(Map<Integer,RexNode> projectMap,
List<RexNode> filters,
RexNode constraint)
Decomposes the WHERE clause of a view into predicates that constraint
a column to a particular value.
|
static void |
RelOptUtil.inferViewPredicates(Map<Integer,RexNode> projectMap,
List<RexNode> filters,
RexNode constraint)
Decomposes the WHERE clause of a view into predicates that constraint
a column to a particular value.
|
protected MutableRel |
SubstitutionVisitor.FilterToProjectUnifyRule.invert(List<Pair<RexNode,String>> namedProjects,
MutableRel input,
RexShuttle shuttle) |
static DataContext |
VisitorDataContext.of(RelDataType rowType,
List<Pair<RexInputRef,RexNode>> usageList) |
static RelOptPredicateList |
RelOptPredicateList.of(RexBuilder rexBuilder,
Iterable<RexNode> pulledUpPredicates)
Creates a RelOptPredicateList with only pulled-up predicates, no inferred
predicates.
|
static RelOptPredicateList |
RelOptPredicateList.of(RexBuilder rexBuilder,
Iterable<RexNode> pulledUpPredicates,
Iterable<RexNode> leftInferredPredicates,
Iterable<RexNode> rightInferredPredicates)
Creates a RelOptPredicateList for a join.
|
static RelOptPredicateList |
RelOptPredicateList.of(RexBuilder rexBuilder,
Iterable<RexNode> pulledUpPredicates,
Iterable<RexNode> leftInferredPredicates,
Iterable<RexNode> rightInferredPredicates)
Creates a RelOptPredicateList for a join.
|
static RelOptPredicateList |
RelOptPredicateList.of(RexBuilder rexBuilder,
Iterable<RexNode> pulledUpPredicates,
Iterable<RexNode> leftInferredPredicates,
Iterable<RexNode> rightInferredPredicates)
Creates a RelOptPredicateList for a join.
|
static Mappings.TargetMapping |
RelOptUtil.permutation(List<RexNode> nodes,
RelDataType inputRowType)
Returns a permutation describing where output fields come from.
|
static Mappings.TargetMapping |
RelOptUtil.permutationIgnoreCast(List<RexNode> nodes,
RelDataType inputRowType)
Returns a permutation describing where output fields come from.
|
static void |
RelOptUtil.projectJoinInputs(RelNode[] inputRels,
List<RexNode> leftJoinKeys,
List<RexNode> rightJoinKeys,
int systemColCount,
List<Integer> leftKeys,
List<Integer> rightKeys,
List<Integer> outputProj)
Deprecated.
|
static void |
RelOptUtil.projectJoinInputs(RelNode[] inputRels,
List<RexNode> leftJoinKeys,
List<RexNode> rightJoinKeys,
int systemColCount,
List<Integer> leftKeys,
List<Integer> rightKeys,
List<Integer> outputProj)
Deprecated.
|
private static RexNode |
RelOptUtil.pushDownEqualJoinConditions(RexNode node,
int leftCount,
int rightCount,
List<RexNode> extraLeftExprs,
List<RexNode> extraRightExprs)
Pushes down parts of a join condition.
|
private static RexNode |
RelOptUtil.pushDownEqualJoinConditions(RexNode node,
int leftCount,
int rightCount,
List<RexNode> extraLeftExprs,
List<RexNode> extraRightExprs)
Pushes down parts of a join condition.
|
static List<RexNode> |
RelOptUtil.pushPastProject(List<? extends RexNode> nodes,
Project project)
Converts a list of expressions that are based on the output fields of a
Project to equivalent expressions on the Project's
input fields. |
static JoinRelType |
RelOptUtil.simplifyJoin(RelNode joinRel,
com.google.common.collect.ImmutableList<RexNode> aboveFilters,
JoinRelType joinType)
Simplifies outer joins if filter above would reject nulls.
|
static RexNode |
RelOptUtil.splitCorrelatedFilterCondition(LogicalFilter filter,
List<RexInputRef> joinKeys,
List<RexNode> correlatedJoinKeys)
Deprecated.
|
static RexNode |
RelOptUtil.splitCorrelatedFilterCondition(LogicalFilter filter,
List<RexNode> joinKeys,
List<RexNode> correlatedJoinKeys,
boolean extractCorrelatedFieldAccess) |
static RexNode |
RelOptUtil.splitCorrelatedFilterCondition(LogicalFilter filter,
List<RexNode> joinKeys,
List<RexNode> correlatedJoinKeys,
boolean extractCorrelatedFieldAccess) |
private static void |
RelOptUtil.splitCorrelatedFilterCondition(LogicalFilter filter,
RexNode condition,
List<RexInputRef> joinKeys,
List<RexNode> correlatedJoinKeys,
List<RexNode> nonEquiList) |
private static void |
RelOptUtil.splitCorrelatedFilterCondition(LogicalFilter filter,
RexNode condition,
List<RexInputRef> joinKeys,
List<RexNode> correlatedJoinKeys,
List<RexNode> nonEquiList) |
private static void |
RelOptUtil.splitCorrelatedFilterCondition(LogicalFilter filter,
RexNode condition,
List<RexNode> joinKeys,
List<RexNode> correlatedJoinKeys,
List<RexNode> nonEquiList,
boolean extractCorrelatedFieldAccess) |
private static void |
RelOptUtil.splitCorrelatedFilterCondition(LogicalFilter filter,
RexNode condition,
List<RexNode> joinKeys,
List<RexNode> correlatedJoinKeys,
List<RexNode> nonEquiList,
boolean extractCorrelatedFieldAccess) |
private static void |
RelOptUtil.splitCorrelatedFilterCondition(LogicalFilter filter,
RexNode condition,
List<RexNode> joinKeys,
List<RexNode> correlatedJoinKeys,
List<RexNode> nonEquiList,
boolean extractCorrelatedFieldAccess) |
static void |
RelOptUtil.splitFilters(ImmutableBitSet childBitmap,
RexNode predicate,
List<RexNode> pushable,
List<RexNode> notPushable)
Splits a filter into two lists, depending on whether or not the filter
only references its child input
|
static void |
RelOptUtil.splitFilters(ImmutableBitSet childBitmap,
RexNode predicate,
List<RexNode> pushable,
List<RexNode> notPushable)
Splits a filter into two lists, depending on whether or not the filter
only references its child input
|
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) |
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.
|
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 void |
RelOptUtil.splitJoinCondition(RexBuilder rexBuilder,
int leftFieldCount,
RexNode condition,
List<Integer> leftKeys,
List<Integer> rightKeys,
List<Boolean> filterNulls,
List<RexNode> nonEquiList) |
private static List<RexNode> |
MaterializedViewSubstitutionVisitor.transformRex(List<RexNode> nodes,
List<RelDataTypeField> oldFields,
List<RelDataTypeField> newFields) |
| Constructor and Description |
|---|
ProjectFilterTable(RexNode condition,
Mappings.TargetMapping mapping,
TableScan scan) |
| Constructor and Description |
|---|
RelOptPredicateList(com.google.common.collect.ImmutableList<RexNode> pulledUpPredicates,
com.google.common.collect.ImmutableList<RexNode> leftInferredPredicates,
com.google.common.collect.ImmutableList<RexNode> rightInferredPredicates,
com.google.common.collect.ImmutableMap<RexNode,RexNode> constantMap) |
RelOptPredicateList(com.google.common.collect.ImmutableList<RexNode> pulledUpPredicates,
com.google.common.collect.ImmutableList<RexNode> leftInferredPredicates,
com.google.common.collect.ImmutableList<RexNode> rightInferredPredicates,
com.google.common.collect.ImmutableMap<RexNode,RexNode> constantMap) |
RelOptPredicateList(com.google.common.collect.ImmutableList<RexNode> pulledUpPredicates,
com.google.common.collect.ImmutableList<RexNode> leftInferredPredicates,
com.google.common.collect.ImmutableList<RexNode> rightInferredPredicates,
com.google.common.collect.ImmutableMap<RexNode,RexNode> constantMap) |
RelOptPredicateList(com.google.common.collect.ImmutableList<RexNode> pulledUpPredicates,
com.google.common.collect.ImmutableList<RexNode> leftInferredPredicates,
com.google.common.collect.ImmutableList<RexNode> rightInferredPredicates,
com.google.common.collect.ImmutableMap<RexNode,RexNode> constantMap) |
RelOptPredicateList(com.google.common.collect.ImmutableList<RexNode> pulledUpPredicates,
com.google.common.collect.ImmutableList<RexNode> leftInferredPredicates,
com.google.common.collect.ImmutableList<RexNode> rightInferredPredicates,
com.google.common.collect.ImmutableMap<RexNode,RexNode> constantMap) |
| Modifier and Type | Field and Description |
|---|---|
private List<RexNode> |
CalcitePrepareImpl.LambdaScalarTranslator.values |
| Modifier and Type | Method and Description |
|---|---|
private RexNode |
CalcitePrepareImpl.EmptyScalarTranslator.binary(Expression expression,
SqlBinaryOperator op) |
RexNode |
CalcitePrepareImpl.EmptyScalarTranslator.parameter(ParameterExpression param) |
RexNode |
CalcitePrepareImpl.LambdaScalarTranslator.parameter(ParameterExpression param) |
RexNode |
CalcitePrepareImpl.ScalarTranslator.toRex(BlockStatement statement) |
RexNode |
CalcitePrepareImpl.EmptyScalarTranslator.toRex(BlockStatement statement) |
RexNode |
CalcitePrepareImpl.ScalarTranslator.toRex(Expression expression) |
RexNode |
CalcitePrepareImpl.EmptyScalarTranslator.toRex(Expression expression) |
(package private) RexNode |
LixToRelTranslator.toRex(FunctionExpression expression,
RelNode... inputs) |
| Modifier and Type | Method and Description |
|---|---|
private List<RexNode> |
CalcitePrepareImpl.EmptyScalarTranslator.toRex(List<Expression> expressions) |
private List<RexNode> |
LixToRelTranslator.toRex(RelNode child,
FunctionExpression expression) |
List<RexNode> |
CalcitePrepareImpl.ScalarTranslator.toRexList(BlockStatement statement) |
List<RexNode> |
CalcitePrepareImpl.EmptyScalarTranslator.toRexList(BlockStatement statement) |
(package private) List<RexNode> |
LixToRelTranslator.toRexList(FunctionExpression expression,
RelNode... inputs) |
| Modifier and Type | Method and Description |
|---|---|
CalcitePrepareImpl.ScalarTranslator |
CalcitePrepareImpl.ScalarTranslator.bind(List<ParameterExpression> parameterList,
List<RexNode> values) |
CalcitePrepareImpl.ScalarTranslator |
CalcitePrepareImpl.EmptyScalarTranslator.bind(List<ParameterExpression> parameterList,
List<RexNode> values) |
| Constructor and Description |
|---|
LambdaScalarTranslator(RexBuilder rexBuilder,
List<ParameterExpression> parameterList,
List<RexNode> values) |
| Modifier and Type | Method and Description |
|---|---|
RexNode |
RelInput.getExpression(String tag)
Returns an expression.
|
| Modifier and Type | Method and Description |
|---|---|
List<RexNode> |
AbstractRelNode.getChildExps() |
List<RexNode> |
RelNode.getChildExps()
Deprecated.
use #accept(org.apache.calcite.rex.RexShuttle)
|
List<RexNode> |
RelInput.getExpressionList(String tag) |
| Modifier and Type | Class and Description |
|---|---|
static class |
Match.RexMRAggCall
Aggregate calls in match recognize.
|
static class |
Window.RexWinAggCall
A call to a windowed aggregate function.
|
| Modifier and Type | Field and Description |
|---|---|
protected RexNode |
Match.after |
protected RexNode |
Filter.condition |
protected RexNode |
Join.condition |
RexNode |
Sort.fetch |
protected RexNode |
Match.interval |
RexNode |
Sort.offset |
protected RexNode |
Match.pattern |
RexNode |
JoinInfo.NonEquiJoinInfo.remaining |
private RexNode |
TableFunctionScan.rexCall |
| Modifier and Type | Field and Description |
|---|---|
protected com.google.common.collect.ImmutableList<RexNode> |
Project.exps |
protected com.google.common.collect.ImmutableList<RexNode> |
Sort.fieldExps |
protected com.google.common.collect.ImmutableMap<String,RexNode> |
Match.measures |
protected List<RexNode> |
Match.partitionKeys |
protected com.google.common.collect.ImmutableMap<String,RexNode> |
Match.patternDefinitions |
private List<RexNode> |
TableModify.sourceExpressionList |
| Modifier and Type | Method and Description |
|---|---|
RexNode |
Match.getAfter() |
RexNode |
TableFunctionScan.getCall()
Returns function invocation expression.
|
RexNode |
Filter.getCondition() |
RexNode |
Join.getCondition() |
RexNode |
JoinInfo.getEquiCondition(RelNode left,
RelNode right,
RexBuilder rexBuilder) |
RexNode |
Match.getInterval() |
RexNode |
Match.getPattern() |
abstract RexNode |
JoinInfo.getRemaining(RexBuilder rexBuilder) |
RexNode |
JoinInfo.EquiJoinInfo.getRemaining(RexBuilder rexBuilder) |
RexNode |
JoinInfo.NonEquiJoinInfo.getRemaining(RexBuilder rexBuilder) |
| Modifier and Type | Method and Description |
|---|---|
List<RexNode> |
Filter.getChildExps() |
List<RexNode> |
Project.getChildExps() |
List<RexNode> |
TableFunctionScan.getChildExps() |
List<RexNode> |
Sort.getChildExps() |
List<RexNode> |
Join.getChildExps() |
com.google.common.collect.ImmutableMap<String,RexNode> |
Match.getMeasures() |
List<Pair<RexNode,String>> |
Project.getNamedProjects()
Returns a list of (expression, name) pairs.
|
List<RexNode> |
Match.getPartitionKeys() |
com.google.common.collect.ImmutableMap<String,RexNode> |
Match.getPatternDefinitions() |
List<RexNode> |
Project.getProjects()
Returns the project expressions.
|
List<RexNode> |
TableModify.getSourceExpressionList() |
| Modifier and Type | Method and Description |
|---|---|
abstract Match |
Match.copy(RelNode input,
RelDataType rowType,
RexNode pattern,
boolean strictStart,
boolean strictEnd,
Map<String,RexNode> patternDefinitions,
Map<String,RexNode> measures,
RexNode after,
Map<String,? extends SortedSet<String>> subsets,
boolean allRows,
List<RexNode> partitionKeys,
RelCollation orderKeys,
RexNode interval) |
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 Sort |
Sort.copy(RelTraitSet traitSet,
RelNode newInput,
RelCollation newCollation,
RexNode offset,
RexNode fetch) |
abstract Filter |
Filter.copy(RelTraitSet traitSet,
RelNode input,
RexNode condition) |
SemiJoin |
SemiJoin.copy(RelTraitSet traitSet,
RexNode condition,
RelNode left,
RelNode right,
JoinRelType joinType,
boolean semiJoinDone) |
abstract Join |
Join.copy(RelTraitSet traitSet,
RexNode conditionExpr,
RelNode left,
RelNode right,
JoinRelType joinType,
boolean semiJoinDone)
Creates a copy of this join, overriding condition, system fields and
inputs.
|
static SemiJoin |
SemiJoin.create(RelNode left,
RelNode right,
RexNode condition,
ImmutableIntList leftKeys,
ImmutableIntList rightKeys)
Creates a SemiJoin.
|
RelNode |
RelFactories.FilterFactory.createFilter(RelNode input,
RexNode condition)
Creates a filter.
|
RelNode |
RelFactories.FilterFactoryImpl.createFilter(RelNode input,
RexNode condition) |
RelNode |
RelFactories.JoinFactory.createJoin(RelNode left,
RelNode right,
RexNode condition,
JoinRelType joinType,
Set<String> variablesStopped,
boolean semiJoinDone)
Deprecated.
|
RelNode |
RelFactories.JoinFactoryImpl.createJoin(RelNode left,
RelNode right,
RexNode condition,
JoinRelType joinType,
Set<String> variablesStopped,
boolean semiJoinDone) |
RelNode |
RelFactories.JoinFactory.createJoin(RelNode left,
RelNode right,
RexNode condition,
Set<CorrelationId> variablesSet,
JoinRelType joinType,
boolean semiJoinDone)
Creates a join.
|
RelNode |
RelFactories.JoinFactoryImpl.createJoin(RelNode left,
RelNode right,
RexNode condition,
Set<CorrelationId> variablesSet,
JoinRelType joinType,
boolean semiJoinDone) |
RelNode |
RelFactories.MatchFactory.createMatch(RelNode input,
RexNode pattern,
RelDataType rowType,
boolean strictStart,
boolean strictEnd,
Map<String,RexNode> patternDefinitions,
Map<String,RexNode> measures,
RexNode after,
Map<String,? extends SortedSet<String>> subsets,
boolean allRows,
List<RexNode> partitionKeys,
RelCollation orderKeys,
RexNode interval)
Creates a
Match. |
RelNode |
RelFactories.MatchFactoryImpl.createMatch(RelNode input,
RexNode pattern,
RelDataType rowType,
boolean strictStart,
boolean strictEnd,
Map<String,RexNode> patternDefinitions,
Map<String,RexNode> measures,
RexNode after,
Map<String,? extends SortedSet<String>> subsets,
boolean allRows,
List<RexNode> partitionKeys,
RelCollation orderKeys,
RexNode interval) |
RelNode |
RelFactories.SemiJoinFactory.createSemiJoin(RelNode left,
RelNode right,
RexNode condition)
Creates a semi-join.
|
RelNode |
RelFactories.SemiJoinFactoryImpl.createSemiJoin(RelNode left,
RelNode right,
RexNode condition) |
RelNode |
RelFactories.SortFactory.createSort(RelNode input,
RelCollation collation,
RexNode offset,
RexNode fetch)
Creates a sort.
|
RelNode |
RelFactories.SortFactoryImpl.createSort(RelNode input,
RelCollation collation,
RexNode offset,
RexNode fetch) |
RelNode |
RelFactories.SortFactory.createSort(RelTraitSet traits,
RelNode input,
RelCollation collation,
RexNode offset,
RexNode fetch)
Deprecated.
|
RelNode |
RelFactories.SortFactoryImpl.createSort(RelTraitSet traits,
RelNode input,
RelCollation collation,
RexNode offset,
RexNode fetch)
Deprecated.
|
static double |
Filter.estimateFilteredRows(RelNode child,
RexNode condition)
Deprecated.
|
static double |
Join.estimateJoinedRows(Join joinRel,
RexNode condition)
Deprecated.
|
Set<String> |
Match.PatternVarFinder.go(RexNode rex) |
static JoinInfo |
JoinInfo.of(RelNode left,
RelNode right,
RexNode condition)
Creates a
JoinInfo by analyzing a condition. |
| Modifier and Type | Method and Description |
|---|---|
RexCall |
Window.RexWinAggCall.clone(RelDataType type,
List<RexNode> operands) |
abstract Match |
Match.copy(RelNode input,
RelDataType rowType,
RexNode pattern,
boolean strictStart,
boolean strictEnd,
Map<String,RexNode> patternDefinitions,
Map<String,RexNode> measures,
RexNode after,
Map<String,? extends SortedSet<String>> subsets,
boolean allRows,
List<RexNode> partitionKeys,
RelCollation orderKeys,
RexNode interval) |
abstract Match |
Match.copy(RelNode input,
RelDataType rowType,
RexNode pattern,
boolean strictStart,
boolean strictEnd,
Map<String,RexNode> patternDefinitions,
Map<String,RexNode> measures,
RexNode after,
Map<String,? extends SortedSet<String>> subsets,
boolean allRows,
List<RexNode> partitionKeys,
RelCollation orderKeys,
RexNode interval) |
abstract Match |
Match.copy(RelNode input,
RelDataType rowType,
RexNode pattern,
boolean strictStart,
boolean strictEnd,
Map<String,RexNode> patternDefinitions,
Map<String,RexNode> measures,
RexNode after,
Map<String,? extends SortedSet<String>> subsets,
boolean allRows,
List<RexNode> partitionKeys,
RelCollation orderKeys,
RexNode interval) |
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.
|
RelNode |
RelFactories.MatchFactory.createMatch(RelNode input,
RexNode pattern,
RelDataType rowType,
boolean strictStart,
boolean strictEnd,
Map<String,RexNode> patternDefinitions,
Map<String,RexNode> measures,
RexNode after,
Map<String,? extends SortedSet<String>> subsets,
boolean allRows,
List<RexNode> partitionKeys,
RelCollation orderKeys,
RexNode interval)
Creates a
Match. |
RelNode |
RelFactories.MatchFactory.createMatch(RelNode input,
RexNode pattern,
RelDataType rowType,
boolean strictStart,
boolean strictEnd,
Map<String,RexNode> patternDefinitions,
Map<String,RexNode> measures,
RexNode after,
Map<String,? extends SortedSet<String>> subsets,
boolean allRows,
List<RexNode> partitionKeys,
RelCollation orderKeys,
RexNode interval)
Creates a
Match. |
RelNode |
RelFactories.MatchFactory.createMatch(RelNode input,
RexNode pattern,
RelDataType rowType,
boolean strictStart,
boolean strictEnd,
Map<String,RexNode> patternDefinitions,
Map<String,RexNode> measures,
RexNode after,
Map<String,? extends SortedSet<String>> subsets,
boolean allRows,
List<RexNode> partitionKeys,
RelCollation orderKeys,
RexNode interval)
Creates a
Match. |
RelNode |
RelFactories.MatchFactoryImpl.createMatch(RelNode input,
RexNode pattern,
RelDataType rowType,
boolean strictStart,
boolean strictEnd,
Map<String,RexNode> patternDefinitions,
Map<String,RexNode> measures,
RexNode after,
Map<String,? extends SortedSet<String>> subsets,
boolean allRows,
List<RexNode> partitionKeys,
RelCollation orderKeys,
RexNode interval) |
RelNode |
RelFactories.MatchFactoryImpl.createMatch(RelNode input,
RexNode pattern,
RelDataType rowType,
boolean strictStart,
boolean strictEnd,
Map<String,RexNode> patternDefinitions,
Map<String,RexNode> measures,
RexNode after,
Map<String,? extends SortedSet<String>> subsets,
boolean allRows,
List<RexNode> partitionKeys,
RelCollation orderKeys,
RexNode interval) |
RelNode |
RelFactories.MatchFactoryImpl.createMatch(RelNode input,
RexNode pattern,
RelDataType rowType,
boolean strictStart,
boolean strictEnd,
Map<String,RexNode> patternDefinitions,
Map<String,RexNode> measures,
RexNode after,
Map<String,? extends SortedSet<String>> subsets,
boolean allRows,
List<RexNode> partitionKeys,
RelCollation orderKeys,
RexNode interval) |
RelNode |
RelFactories.ProjectFactory.createProject(RelNode input,
List<? extends RexNode> childExprs,
List<String> fieldNames)
Creates a project.
|
RelNode |
RelFactories.ProjectFactoryImpl.createProject(RelNode input,
List<? extends RexNode> childExprs,
List<String> fieldNames) |
static Mappings.TargetMapping |
Project.getMapping(int inputFieldCount,
List<? extends RexNode> projects)
Returns a mapping of a set of project expressions.
|
static Mappings.TargetMapping |
Project.getPartialMapping(int inputFieldCount,
List<? extends RexNode> projects)
Returns a partial mapping of a set of project expressions.
|
static Permutation |
Project.getPermutation(int inputFieldCount,
List<? extends RexNode> projects)
Returns a permutation, if this projection is merely a permutation of its
input fields; otherwise null.
|
static ImmutableIntList |
Window.getProjectOrdinals(List<RexNode> exprs) |
Set<String> |
Match.PatternVarFinder.go(List<RexNode> rexNodeList) |
| Constructor and Description |
|---|
EquiJoin(RelOptCluster cluster,
RelTraitSet traits,
RelNode left,
RelNode right,
RexNode condition,
ImmutableIntList leftKeys,
ImmutableIntList rightKeys,
JoinRelType joinType,
Set<String> variablesStopped)
Deprecated.
|
EquiJoin(RelOptCluster cluster,
RelTraitSet traits,
RelNode left,
RelNode right,
RexNode condition,
ImmutableIntList leftKeys,
ImmutableIntList rightKeys,
Set<CorrelationId> variablesSet,
JoinRelType joinType)
Creates an EquiJoin.
|
Filter(RelOptCluster cluster,
RelTraitSet traits,
RelNode child,
RexNode condition)
Creates a filter.
|
Join(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode left,
RelNode right,
RexNode condition,
JoinRelType joinType,
Set<String> variablesStopped)
Deprecated.
|
Join(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode left,
RelNode right,
RexNode condition,
Set<CorrelationId> variablesSet,
JoinRelType joinType)
Creates a Join.
|
Match(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode input,
RelDataType rowType,
RexNode pattern,
boolean strictStart,
boolean strictEnd,
Map<String,RexNode> patternDefinitions,
Map<String,RexNode> measures,
RexNode after,
Map<String,? extends SortedSet<String>> subsets,
boolean allRows,
List<RexNode> partitionKeys,
RelCollation orderKeys,
RexNode interval)
Creates a Match.
|
NonEquiJoinInfo(ImmutableIntList leftKeys,
ImmutableIntList rightKeys,
RexNode remaining) |
SemiJoin(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode left,
RelNode right,
RexNode condition,
ImmutableIntList leftKeys,
ImmutableIntList rightKeys)
Creates a SemiJoin.
|
Sort(RelOptCluster cluster,
RelTraitSet traits,
RelNode child,
RelCollation collation,
RexNode offset,
RexNode fetch)
Creates a Sort.
|
TableFunctionScan(RelOptCluster cluster,
RelTraitSet traits,
List<RelNode> inputs,
RexNode rexCall,
Type elementType,
RelDataType rowType,
Set<RelColumnMapping> columnMappings)
Creates a
TableFunctionScan. |
| Constructor and Description |
|---|
Match(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode input,
RelDataType rowType,
RexNode pattern,
boolean strictStart,
boolean strictEnd,
Map<String,RexNode> patternDefinitions,
Map<String,RexNode> measures,
RexNode after,
Map<String,? extends SortedSet<String>> subsets,
boolean allRows,
List<RexNode> partitionKeys,
RelCollation orderKeys,
RexNode interval)
Creates a Match.
|
Match(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode input,
RelDataType rowType,
RexNode pattern,
boolean strictStart,
boolean strictEnd,
Map<String,RexNode> patternDefinitions,
Map<String,RexNode> measures,
RexNode after,
Map<String,? extends SortedSet<String>> subsets,
boolean allRows,
List<RexNode> partitionKeys,
RelCollation orderKeys,
RexNode interval)
Creates a Match.
|
Match(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode input,
RelDataType rowType,
RexNode pattern,
boolean strictStart,
boolean strictEnd,
Map<String,RexNode> patternDefinitions,
Map<String,RexNode> measures,
RexNode after,
Map<String,? extends SortedSet<String>> subsets,
boolean allRows,
List<RexNode> partitionKeys,
RelCollation orderKeys,
RexNode interval)
Creates a Match.
|
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.
|
RexMRAggCall(SqlAggFunction aggFun,
RelDataType type,
List<RexNode> operands,
int ordinal) |
RexWinAggCall(SqlAggFunction aggFun,
RelDataType type,
List<RexNode> operands,
int ordinal,
boolean distinct)
Creates a RexWinAggCall.
|
TableModify(RelOptCluster cluster,
RelTraitSet traitSet,
RelOptTable table,
Prepare.CatalogReader catalogReader,
RelNode input,
TableModify.Operation operation,
List<String> updateColumnList,
List<RexNode> sourceExpressionList,
boolean flattened)
Creates a
TableModify. |
| Modifier and Type | Method and Description |
|---|---|
(package private) RexNode |
RelJson.toRex(RelInput relInput,
Object o) |
| Modifier and Type | Method and Description |
|---|---|
private List<RexNode> |
RelJson.toRexList(RelInput relInput,
List operands) |
| Modifier and Type | Method and Description |
|---|---|
private Object |
RelJson.toJson(RexNode node) |
| Modifier and Type | Method and Description |
|---|---|
private static List<RexNode> |
LogicalWindow.toInputRefs(List<? extends RexNode> operands) |
| Modifier and Type | Method and Description |
|---|---|
Match |
LogicalMatch.copy(RelNode input,
RelDataType rowType,
RexNode pattern,
boolean strictStart,
boolean strictEnd,
Map<String,RexNode> patternDefinitions,
Map<String,RexNode> measures,
RexNode after,
Map<String,? extends SortedSet<String>> subsets,
boolean allRows,
List<RexNode> partitionKeys,
RelCollation orderKeys,
RexNode interval) |
LogicalTableFunctionScan |
LogicalTableFunctionScan.copy(RelTraitSet traitSet,
List<RelNode> inputs,
RexNode rexCall,
Type elementType,
RelDataType rowType,
Set<RelColumnMapping> columnMappings) |
Sort |
LogicalSort.copy(RelTraitSet traitSet,
RelNode newInput,
RelCollation newCollation,
RexNode offset,
RexNode fetch) |
LogicalFilter |
LogicalFilter.copy(RelTraitSet traitSet,
RelNode input,
RexNode condition) |
LogicalJoin |
LogicalJoin.copy(RelTraitSet traitSet,
RexNode conditionExpr,
RelNode left,
RelNode right,
JoinRelType joinType,
boolean semiJoinDone) |
static LogicalSort |
LogicalSort.create(RelNode input,
RelCollation collation,
RexNode offset,
RexNode fetch)
Creates a LogicalSort.
|
static LogicalMatch |
LogicalMatch.create(RelNode input,
RelDataType rowType,
RexNode pattern,
boolean strictStart,
boolean strictEnd,
Map<String,RexNode> patternDefinitions,
Map<String,RexNode> measures,
RexNode after,
Map<String,? extends SortedSet<String>> subsets,
boolean allRows,
List<RexNode> partitionKeys,
RelCollation orderKeys,
RexNode interval)
Creates a LogicalMatch.
|
static LogicalJoin |
LogicalJoin.create(RelNode left,
RelNode right,
RexNode condition,
JoinRelType joinType,
Set<String> variablesStopped)
Deprecated.
|
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)
Creates a LogicalJoin.
|
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.
|
static LogicalFilter |
LogicalFilter.create(RelNode input,
RexNode condition)
Creates a LogicalFilter.
|
static LogicalFilter |
LogicalFilter.create(RelNode input,
RexNode condition,
com.google.common.collect.ImmutableSet<CorrelationId> variablesSet)
Creates a LogicalFilter.
|
static LogicalTableFunctionScan |
LogicalTableFunctionScan.create(RelOptCluster cluster,
List<RelNode> inputs,
RexNode rexCall,
Type elementType,
RelDataType rowType,
Set<RelColumnMapping> columnMappings)
Creates a LogicalTableFunctionScan.
|
| Modifier and Type | Method and Description |
|---|---|
Match |
LogicalMatch.copy(RelNode input,
RelDataType rowType,
RexNode pattern,
boolean strictStart,
boolean strictEnd,
Map<String,RexNode> patternDefinitions,
Map<String,RexNode> measures,
RexNode after,
Map<String,? extends SortedSet<String>> subsets,
boolean allRows,
List<RexNode> partitionKeys,
RelCollation orderKeys,
RexNode interval) |
Match |
LogicalMatch.copy(RelNode input,
RelDataType rowType,
RexNode pattern,
boolean strictStart,
boolean strictEnd,
Map<String,RexNode> patternDefinitions,
Map<String,RexNode> measures,
RexNode after,
Map<String,? extends SortedSet<String>> subsets,
boolean allRows,
List<RexNode> partitionKeys,
RelCollation orderKeys,
RexNode interval) |
Match |
LogicalMatch.copy(RelNode input,
RelDataType rowType,
RexNode pattern,
boolean strictStart,
boolean strictEnd,
Map<String,RexNode> patternDefinitions,
Map<String,RexNode> measures,
RexNode after,
Map<String,? extends SortedSet<String>> subsets,
boolean allRows,
List<RexNode> partitionKeys,
RelCollation orderKeys,
RexNode interval) |
LogicalProject |
LogicalProject.copy(RelTraitSet traitSet,
RelNode input,
List<RexNode> projects,
RelDataType rowType) |
static LogicalProject |
LogicalProject.create(RelNode input,
List<? extends RexNode> projects,
List<String> fieldNames)
Creates a LogicalProject.
|
static LogicalProject |
LogicalProject.create(RelNode input,
List<? extends RexNode> projects,
RelDataType rowType)
Creates a LogicalProject, specifying row type rather than field names.
|
static LogicalMatch |
LogicalMatch.create(RelNode input,
RelDataType rowType,
RexNode pattern,
boolean strictStart,
boolean strictEnd,
Map<String,RexNode> patternDefinitions,
Map<String,RexNode> measures,
RexNode after,
Map<String,? extends SortedSet<String>> subsets,
boolean allRows,
List<RexNode> partitionKeys,
RelCollation orderKeys,
RexNode interval)
Creates a LogicalMatch.
|
static LogicalMatch |
LogicalMatch.create(RelNode input,
RelDataType rowType,
RexNode pattern,
boolean strictStart,
boolean strictEnd,
Map<String,RexNode> patternDefinitions,
Map<String,RexNode> measures,
RexNode after,
Map<String,? extends SortedSet<String>> subsets,
boolean allRows,
List<RexNode> partitionKeys,
RelCollation orderKeys,
RexNode interval)
Creates a LogicalMatch.
|
static LogicalMatch |
LogicalMatch.create(RelNode input,
RelDataType rowType,
RexNode pattern,
boolean strictStart,
boolean strictEnd,
Map<String,RexNode> patternDefinitions,
Map<String,RexNode> measures,
RexNode after,
Map<String,? extends SortedSet<String>> subsets,
boolean allRows,
List<RexNode> partitionKeys,
RelCollation orderKeys,
RexNode interval)
Creates a LogicalMatch.
|
static LogicalTableModify |
LogicalTableModify.create(RelOptTable table,
Prepare.CatalogReader schema,
RelNode input,
TableModify.Operation operation,
List<String> updateColumnList,
List<RexNode> sourceExpressionList,
boolean flattened)
Creates a LogicalTableModify.
|
private static List<RexNode> |
LogicalWindow.toInputRefs(List<? extends RexNode> operands) |
| Constructor and Description |
|---|
LogicalFilter(RelOptCluster cluster,
RelNode child,
RexNode condition)
Deprecated.
|
LogicalFilter(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode child,
RexNode condition)
Deprecated.
|
LogicalFilter(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode child,
RexNode condition,
com.google.common.collect.ImmutableSet<CorrelationId> variablesSet)
Creates a LogicalFilter.
|
LogicalJoin(RelOptCluster cluster,
RelNode left,
RelNode right,
RexNode condition,
JoinRelType joinType,
Set<String> variablesStopped)
Deprecated.
|
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.
|
LogicalMatch(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode input,
RelDataType rowType,
RexNode pattern,
boolean strictStart,
boolean strictEnd,
Map<String,RexNode> patternDefinitions,
Map<String,RexNode> measures,
RexNode after,
Map<String,? extends SortedSet<String>> subsets,
boolean allRows,
List<RexNode> partitionKeys,
RelCollation orderKeys,
RexNode interval)
Creates a LogicalMatch.
|
LogicalSort(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode input,
RelCollation collation,
RexNode offset,
RexNode fetch) |
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. |
| Constructor and Description |
|---|
LogicalMatch(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode input,
RelDataType rowType,
RexNode pattern,
boolean strictStart,
boolean strictEnd,
Map<String,RexNode> patternDefinitions,
Map<String,RexNode> measures,
RexNode after,
Map<String,? extends SortedSet<String>> subsets,
boolean allRows,
List<RexNode> partitionKeys,
RelCollation orderKeys,
RexNode interval)
Creates a LogicalMatch.
|
LogicalMatch(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode input,
RelDataType rowType,
RexNode pattern,
boolean strictStart,
boolean strictEnd,
Map<String,RexNode> patternDefinitions,
Map<String,RexNode> measures,
RexNode after,
Map<String,? extends SortedSet<String>> subsets,
boolean allRows,
List<RexNode> partitionKeys,
RelCollation orderKeys,
RexNode interval)
Creates a LogicalMatch.
|
LogicalMatch(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode input,
RelDataType rowType,
RexNode pattern,
boolean strictStart,
boolean strictEnd,
Map<String,RexNode> patternDefinitions,
Map<String,RexNode> measures,
RexNode after,
Map<String,? extends SortedSet<String>> subsets,
boolean allRows,
List<RexNode> partitionKeys,
RelCollation orderKeys,
RexNode interval)
Creates a LogicalMatch.
|
LogicalProject(RelOptCluster cluster,
RelNode input,
List<RexNode> projects,
List<String> fieldNames,
int flags)
Deprecated.
|
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.
|
LogicalTableModify(RelOptCluster cluster,
RelTraitSet traitSet,
RelOptTable table,
Prepare.CatalogReader schema,
RelNode input,
TableModify.Operation operation,
List<String> updateColumnList,
List<RexNode> sourceExpressionList,
boolean flattened)
Creates a LogicalTableModify.
|
| Modifier and Type | Field and Description |
|---|---|
(package private) RexNode |
RelMdPredicates.JoinConditionBasedPredicateInference.leftChildPredicates |
(package private) RexNode |
RelMdPredicates.JoinConditionBasedPredicateInference.rightChildPredicates |
| Modifier and Type | Field and Description |
|---|---|
private static List<RexNode> |
RelMdPredicates.EMPTY_LIST |
private Map<RexInputRef,RexNode> |
RelMdExpressionLineage.RexReplacer.replacementValues |
| Modifier and Type | Method and Description |
|---|---|
(package private) RexNode |
RelMdPredicates.JoinConditionBasedPredicateInference.compose(RexBuilder rexBuilder,
Iterable<RexNode> exprs) |
RexNode |
RelMdPredicates.JoinConditionBasedPredicateInference.left() |
static RexNode |
RelMdUtil.makeSemiJoinSelectivityRexNode(RelMetadataQuery mq,
SemiJoin rel)
Creates a RexNode that stores a selectivity value corresponding to the
selectivity of a semijoin.
|
static RexNode |
RelMdUtil.minusPreds(RexBuilder rexBuilder,
RexNode pred1,
RexNode pred2)
Takes the difference between two predicates, removing from the first any
predicates also in the second
|
private RexNode |
RelMdPredicates.projectPredicate(RexBuilder rexBuilder,
RelNode input,
RexNode r,
ImmutableBitSet columnsMapped)
Converts a predicate on a particular set of columns into a predicate on
a subset of those columns, weakening if necessary.
|
RexNode |
RelMdPredicates.JoinConditionBasedPredicateInference.right() |
static RexNode |
RelMdUtil.unionPreds(RexBuilder rexBuilder,
RexNode pred1,
RexNode pred2)
AND's two predicates together, either of which may be null, removing
redundant filters.
|
RexNode |
RelMdExpressionLineage.RexReplacer.visitInputRef(RexInputRef inputRef) |
| Modifier and Type | Method and Description |
|---|---|
private static Set<RexNode> |
RelMdExpressionLineage.createAllPossibleExpressions(RexBuilder rexBuilder,
RexNode expr,
ImmutableBitSet predFieldsUsed,
Map<RexInputRef,Set<RexNode>> mapping,
Map<RexInputRef,RexNode> singleMapping) |
protected static Set<RexNode> |
RelMdExpressionLineage.createAllPossibleExpressions(RexBuilder rexBuilder,
RexNode expr,
Map<RexInputRef,Set<RexNode>> mapping)
Given an expression, it will create all equivalent expressions resulting
from replacing all possible combinations of references in the mapping by
the corresponding expressions.
|
Set<RexNode> |
RelMdExpressionLineage.getExpressionLineage(Aggregate rel,
RelMetadataQuery mq,
RexNode outputExpression)
Expression lineage from
Aggregate. |
Set<RexNode> |
RelMdExpressionLineage.getExpressionLineage(Exchange rel,
RelMetadataQuery mq,
RexNode outputExpression)
Expression lineage from Exchange.
|
Set<RexNode> |
RelMdExpressionLineage.getExpressionLineage(Filter rel,
RelMetadataQuery mq,
RexNode outputExpression)
Expression lineage from Filter.
|
Set<RexNode> |
RelMdExpressionLineage.getExpressionLineage(HepRelVertex rel,
RelMetadataQuery mq,
RexNode outputExpression) |
Set<RexNode> |
RelMdExpressionLineage.getExpressionLineage(Join rel,
RelMetadataQuery mq,
RexNode outputExpression)
Expression lineage from
Join. |
Set<RexNode> |
RelMdExpressionLineage.getExpressionLineage(Project rel,
RelMetadataQuery mq,
RexNode outputExpression)
Expression lineage from Project.
|
Set<RexNode> |
RelMdExpressionLineage.getExpressionLineage(RelNode rel,
RelMetadataQuery mq,
RexNode outputExpression) |
Set<RexNode> |
BuiltInMetadata.ExpressionLineage.Handler.getExpressionLineage(RelNode r,
RelMetadataQuery mq,
RexNode expression) |
Set<RexNode> |
RelMetadataQuery.getExpressionLineage(RelNode rel,
RexNode expression)
Determines the origin of a column.
|
Set<RexNode> |
RelMdExpressionLineage.getExpressionLineage(RelSubset rel,
RelMetadataQuery mq,
RexNode outputExpression) |
Set<RexNode> |
BuiltInMetadata.ExpressionLineage.getExpressionLineage(RexNode expression)
Given the input expression applied on the given
RelNode, this
provider returns the expression with its lineage resolved. |
Set<RexNode> |
RelMdExpressionLineage.getExpressionLineage(Sort rel,
RelMetadataQuery mq,
RexNode outputExpression)
Expression lineage from Sort.
|
Set<RexNode> |
RelMdExpressionLineage.getExpressionLineage(TableScan rel,
RelMetadataQuery mq,
RexNode outputExpression)
Expression lineage from
TableScan. |
Set<RexNode> |
RelMdExpressionLineage.getExpressionLineage(Union rel,
RelMetadataQuery mq,
RexNode outputExpression)
Expression lineage from
Union. |
| Modifier and Type | Method and Description |
|---|---|
Double |
RelMdSize.averageRexSize(RexNode node,
List<Double> inputColumnSizes) |
static Double |
RelMdUtil.cardOfProjExpr(RelMetadataQuery mq,
Project rel,
RexNode expr)
Computes the cardinality of a particular expression from the projection
list.
|
static boolean |
RelMdUtil.checkInputForCollationAndLimit(RelMetadataQuery mq,
RelNode input,
RelCollation collation,
RexNode offset,
RexNode fetch)
Returns whether a relational expression is already sorted and has fewer
rows than the sum of offset and limit.
|
private static Set<RexNode> |
RelMdExpressionLineage.createAllPossibleExpressions(RexBuilder rexBuilder,
RexNode expr,
ImmutableBitSet predFieldsUsed,
Map<RexInputRef,Set<RexNode>> mapping,
Map<RexInputRef,RexNode> singleMapping) |
protected static Set<RexNode> |
RelMdExpressionLineage.createAllPossibleExpressions(RexBuilder rexBuilder,
RexNode expr,
Map<RexInputRef,Set<RexNode>> mapping)
Given an expression, it will create all equivalent expressions resulting
from replacing all possible combinations of references in the mapping by
the corresponding expressions.
|
private static void |
RelMdExpressionLineage.createExpressions(RexBuilder rexBuilder,
RexNode expr,
ImmutableBitSet predFieldsUsed,
Map<RexInputRef,Set<RexNode>> mapping,
Map<RexInputRef,RexNode> singleMapping,
Set<RexNode> result) |
static double |
RelMdUtil.estimateFilteredRows(RelNode child,
RexNode condition,
RelMetadataQuery mq) |
Double |
RelMdDistinctRowCount.getDistinctRowCount(Aggregate rel,
RelMetadataQuery mq,
ImmutableBitSet groupKey,
RexNode predicate) |
Double |
RelMdDistinctRowCount.getDistinctRowCount(Exchange rel,
RelMetadataQuery mq,
ImmutableBitSet groupKey,
RexNode predicate) |
Double |
RelMdDistinctRowCount.getDistinctRowCount(Filter rel,
RelMetadataQuery mq,
ImmutableBitSet groupKey,
RexNode predicate) |
Double |
BuiltInMetadata.DistinctRowCount.getDistinctRowCount(ImmutableBitSet groupKey,
RexNode predicate)
Estimates the number of rows which would be produced by a GROUP BY on the
set of columns indicated by groupKey, where the input to the GROUP BY has
been pre-filtered by predicate.
|
Double |
RelMdDistinctRowCount.getDistinctRowCount(Join rel,
RelMetadataQuery mq,
ImmutableBitSet groupKey,
RexNode predicate) |
Double |
RelMdDistinctRowCount.getDistinctRowCount(Project rel,
RelMetadataQuery mq,
ImmutableBitSet groupKey,
RexNode predicate) |
Double |
RelMetadataQuery.getDistinctRowCount(RelNode rel,
ImmutableBitSet groupKey,
RexNode predicate)
Returns the
BuiltInMetadata.DistinctRowCount.getDistinctRowCount(ImmutableBitSet, RexNode)
statistic. |
Double |
RelMdDistinctRowCount.getDistinctRowCount(RelNode rel,
RelMetadataQuery mq,
ImmutableBitSet groupKey,
RexNode predicate)
Catch-all implementation for
BuiltInMetadata.DistinctRowCount.getDistinctRowCount(ImmutableBitSet, RexNode),
invoked using reflection. |
Double |
BuiltInMetadata.DistinctRowCount.Handler.getDistinctRowCount(RelNode r,
RelMetadataQuery mq,
ImmutableBitSet groupKey,
RexNode predicate) |
Double |
RelMdDistinctRowCount.getDistinctRowCount(RelSubset rel,
RelMetadataQuery mq,
ImmutableBitSet groupKey,
RexNode predicate) |
Double |
RelMdDistinctRowCount.getDistinctRowCount(SemiJoin rel,
RelMetadataQuery mq,
ImmutableBitSet groupKey,
RexNode predicate) |
Double |
RelMdDistinctRowCount.getDistinctRowCount(Sort rel,
RelMetadataQuery mq,
ImmutableBitSet groupKey,
RexNode predicate) |
Double |
RelMdDistinctRowCount.getDistinctRowCount(Union rel,
RelMetadataQuery mq,
ImmutableBitSet groupKey,
RexNode predicate) |
Double |
RelMdDistinctRowCount.getDistinctRowCount(Values rel,
RelMetadataQuery mq,
ImmutableBitSet groupKey,
RexNode predicate) |
Set<RexNode> |
RelMdExpressionLineage.getExpressionLineage(Aggregate rel,
RelMetadataQuery mq,
RexNode outputExpression)
Expression lineage from
Aggregate. |
Set<RexNode> |
RelMdExpressionLineage.getExpressionLineage(Exchange rel,
RelMetadataQuery mq,
RexNode outputExpression)
Expression lineage from Exchange.
|
Set<RexNode> |
RelMdExpressionLineage.getExpressionLineage(Filter rel,
RelMetadataQuery mq,
RexNode outputExpression)
Expression lineage from Filter.
|
Set<RexNode> |
RelMdExpressionLineage.getExpressionLineage(HepRelVertex rel,
RelMetadataQuery mq,
RexNode outputExpression) |
Set<RexNode> |
RelMdExpressionLineage.getExpressionLineage(Join rel,
RelMetadataQuery mq,
RexNode outputExpression)
Expression lineage from
Join. |
Set<RexNode> |
RelMdExpressionLineage.getExpressionLineage(Project rel,
RelMetadataQuery mq,
RexNode outputExpression)
Expression lineage from Project.
|
Set<RexNode> |
RelMdExpressionLineage.getExpressionLineage(RelNode rel,
RelMetadataQuery mq,
RexNode outputExpression) |
Set<RexNode> |
BuiltInMetadata.ExpressionLineage.Handler.getExpressionLineage(RelNode r,
RelMetadataQuery mq,
RexNode expression) |
Set<RexNode> |
RelMetadataQuery.getExpressionLineage(RelNode rel,
RexNode expression)
Determines the origin of a column.
|
Set<RexNode> |
RelMdExpressionLineage.getExpressionLineage(RelSubset rel,
RelMetadataQuery mq,
RexNode outputExpression) |
Set<RexNode> |
BuiltInMetadata.ExpressionLineage.getExpressionLineage(RexNode expression)
Given the input expression applied on the given
RelNode, this
provider returns the expression with its lineage resolved. |
Set<RexNode> |
RelMdExpressionLineage.getExpressionLineage(Sort rel,
RelMetadataQuery mq,
RexNode outputExpression)
Expression lineage from Sort.
|
Set<RexNode> |
RelMdExpressionLineage.getExpressionLineage(TableScan rel,
RelMetadataQuery mq,
RexNode outputExpression)
Expression lineage from
TableScan. |
Set<RexNode> |
RelMdExpressionLineage.getExpressionLineage(Union rel,
RelMetadataQuery mq,
RexNode outputExpression)
Expression lineage from
Union. |
static Double |
RelMdUtil.getJoinDistinctRowCount(RelMetadataQuery mq,
RelNode joinRel,
JoinRelType joinType,
ImmutableBitSet groupKey,
RexNode predicate,
boolean useMaxNdv)
Computes the number of distinct rows for a set of keys returned from a
join.
|
static Double |
RelMdUtil.getJoinRowCount(RelMetadataQuery mq,
Join join,
RexNode condition)
Returns an estimate of the number of rows returned by a
Join. |
Double |
RelMdSelectivity.getSelectivity(Aggregate rel,
RelMetadataQuery mq,
RexNode predicate) |
Double |
RelMdSelectivity.getSelectivity(Filter rel,
RelMetadataQuery mq,
RexNode predicate) |
Double |
RelMdSelectivity.getSelectivity(Project rel,
RelMetadataQuery mq,
RexNode predicate) |
Double |
RelMdSelectivity.getSelectivity(RelNode rel,
RelMetadataQuery mq,
RexNode predicate) |
Double |
BuiltInMetadata.Selectivity.Handler.getSelectivity(RelNode r,
RelMetadataQuery mq,
RexNode predicate) |
Double |
RelMetadataQuery.getSelectivity(RelNode rel,
RexNode predicate)
Returns the
BuiltInMetadata.Selectivity.getSelectivity(RexNode)
statistic. |
Double |
BuiltInMetadata.Selectivity.getSelectivity(RexNode predicate)
Estimates the percentage of an expression's output rows which satisfy a
given predicate.
|
Double |
RelMdSelectivity.getSelectivity(SemiJoin rel,
RelMetadataQuery mq,
RexNode predicate) |
Double |
RelMdSelectivity.getSelectivity(Sort rel,
RelMetadataQuery mq,
RexNode predicate) |
Double |
RelMdSelectivity.getSelectivity(Union rel,
RelMetadataQuery mq,
RexNode predicate) |
static double |
RelMdUtil.getSelectivityValue(RexNode artificialSelectivityFuncNode)
Returns the selectivity value stored in a call.
|
static Double |
RelMdUtil.getSemiJoinRowCount(RelMetadataQuery mq,
RelNode left,
RelNode right,
JoinRelType joinType,
RexNode condition)
Returns an estimate of the number of rows returned by a
SemiJoin. |
static double |
RelMdUtil.guessSelectivity(RexNode predicate)
Returns default estimates for selectivities, in the absence of stats.
|
static double |
RelMdUtil.guessSelectivity(RexNode predicate,
boolean artificialOnly)
Returns default estimates for selectivities, in the absence of stats.
|
private void |
RelMdPredicates.JoinConditionBasedPredicateInference.infer(RexNode predicates,
Set<String> allExprsDigests,
List<RexNode> inferedPredicates,
boolean includeEqualityInference,
ImmutableBitSet inferringFields) |
private boolean |
RelMdPredicates.JoinConditionBasedPredicateInference.isAlwaysTrue(RexNode predicate) |
(package private) Iterable<Mapping> |
RelMdPredicates.JoinConditionBasedPredicateInference.mappings(RexNode predicate) |
static RexNode |
RelMdUtil.minusPreds(RexBuilder rexBuilder,
RexNode pred1,
RexNode pred2)
Takes the difference between two predicates, removing from the first any
predicates also in the second
|
private int |
RelMdPredicates.JoinConditionBasedPredicateInference.pos(RexNode expr) |
private RexNode |
RelMdPredicates.projectPredicate(RexBuilder rexBuilder,
RelNode input,
RexNode r,
ImmutableBitSet columnsMapped)
Converts a predicate on a particular set of columns into a predicate on
a subset of those columns, weakening if necessary.
|
static RexNode |
RelMdUtil.unionPreds(RexBuilder rexBuilder,
RexNode pred1,
RexNode pred2)
AND's two predicates together, either of which may be null, removing
redundant filters.
|
| Modifier and Type | Method and Description |
|---|---|
(package private) RexNode |
RelMdPredicates.JoinConditionBasedPredicateInference.compose(RexBuilder rexBuilder,
Iterable<RexNode> exprs) |
private static Set<RexNode> |
RelMdExpressionLineage.createAllPossibleExpressions(RexBuilder rexBuilder,
RexNode expr,
ImmutableBitSet predFieldsUsed,
Map<RexInputRef,Set<RexNode>> mapping,
Map<RexInputRef,RexNode> singleMapping) |
private static Set<RexNode> |
RelMdExpressionLineage.createAllPossibleExpressions(RexBuilder rexBuilder,
RexNode expr,
ImmutableBitSet predFieldsUsed,
Map<RexInputRef,Set<RexNode>> mapping,
Map<RexInputRef,RexNode> singleMapping) |
protected static Set<RexNode> |
RelMdExpressionLineage.createAllPossibleExpressions(RexBuilder rexBuilder,
RexNode expr,
Map<RexInputRef,Set<RexNode>> mapping)
Given an expression, it will create all equivalent expressions resulting
from replacing all possible combinations of references in the mapping by
the corresponding expressions.
|
private static void |
RelMdExpressionLineage.createExpressions(RexBuilder rexBuilder,
RexNode expr,
ImmutableBitSet predFieldsUsed,
Map<RexInputRef,Set<RexNode>> mapping,
Map<RexInputRef,RexNode> singleMapping,
Set<RexNode> result) |
private static void |
RelMdExpressionLineage.createExpressions(RexBuilder rexBuilder,
RexNode expr,
ImmutableBitSet predFieldsUsed,
Map<RexInputRef,Set<RexNode>> mapping,
Map<RexInputRef,RexNode> singleMapping,
Set<RexNode> result) |
private static void |
RelMdExpressionLineage.createExpressions(RexBuilder rexBuilder,
RexNode expr,
ImmutableBitSet predFieldsUsed,
Map<RexInputRef,Set<RexNode>> mapping,
Map<RexInputRef,RexNode> singleMapping,
Set<RexNode> result) |
private void |
RelMdPredicates.JoinConditionBasedPredicateInference.infer(RexNode predicates,
Set<String> allExprsDigests,
List<RexNode> inferedPredicates,
boolean includeEqualityInference,
ImmutableBitSet inferringFields) |
static List<RelCollation> |
RelMdCollation.project(RelMetadataQuery mq,
RelNode input,
List<? extends RexNode> projects)
Helper method to determine a
Project's collation. |
static RelDistribution |
RelMdDistribution.project(RelMetadataQuery mq,
RelNode input,
List<? extends RexNode> projects)
Helper method to determine a
Project's collation. |
static void |
RelMdUtil.splitCols(List<RexNode> projExprs,
ImmutableBitSet groupKey,
ImmutableBitSet.Builder baseCols,
ImmutableBitSet.Builder projCols)
Forms two bitmaps by splitting the columns in a bitmap according to
whether or not the column references the child input or is an expression
|
| Constructor and Description |
|---|
JoinConditionBasedPredicateInference(Join joinRel,
boolean isSemiJoin,
RexNode lPreds,
RexNode rPreds) |
JoinConditionBasedPredicateInference(Join joinRel,
RexNode lPreds,
RexNode rPreds) |
| Constructor and Description |
|---|
RexReplacer(Map<RexInputRef,RexNode> replacementValues) |
| Modifier and Type | Field and Description |
|---|---|
RexNode |
MutableSemiJoin.condition |
RexNode |
MutableJoin.condition |
RexNode |
MutableFilter.condition |
RexNode |
MutableSort.fetch |
RexNode |
MutableSort.offset |
RexNode |
MutableTableFunctionScan.rexCall |
| Modifier and Type | Field and Description |
|---|---|
List<RexNode> |
MutableProject.projects |
List<RexNode> |
MutableTableModify.sourceExpressionList |
| Modifier and Type | Method and Description |
|---|---|
List<Pair<RexNode,String>> |
MutableProject.getNamedProjects()
Returns a list of (expression, name) pairs.
|
| Modifier and Type | Method and Description |
|---|---|
static MutableSort |
MutableSort.of(MutableRel input,
RelCollation collation,
RexNode offset,
RexNode fetch)
Creates a MutableSort.
|
static MutableFilter |
MutableFilter.of(MutableRel input,
RexNode condition)
Creates a MutableFilter.
|
static MutableSemiJoin |
MutableSemiJoin.of(RelDataType rowType,
MutableRel left,
MutableRel right,
RexNode condition,
ImmutableIntList leftKeys,
ImmutableIntList rightKeys)
Creates a MutableSemiJoin.
|
static MutableJoin |
MutableJoin.of(RelDataType rowType,
MutableRel left,
MutableRel right,
RexNode condition,
JoinRelType joinType,
Set<CorrelationId> variablesStopped)
Creates a MutableJoin.
|
static MutableTableFunctionScan |
MutableTableFunctionScan.of(RelOptCluster cluster,
RelDataType rowType,
List<MutableRel> inputs,
RexNode rexCall,
Type elementType,
Set<RelColumnMapping> columnMappings)
Creates a MutableTableFunctionScan.
|
| Modifier and Type | Method and Description |
|---|---|
static MutableRel |
MutableProject.of(MutableRel input,
List<RexNode> exprList,
List<String> fieldNameList)
Creates a MutableProject.
|
static MutableProject |
MutableProject.of(RelDataType rowType,
MutableRel input,
List<RexNode> projects)
Creates a MutableProject.
|
static MutableTableModify |
MutableTableModify.of(RelDataType rowType,
MutableRel input,
RelOptTable table,
Prepare.CatalogReader catalogReader,
TableModify.Operation operation,
List<String> updateColumnList,
List<RexNode> sourceExpressionList,
boolean flattened)
Creates a MutableTableModify.
|
| Constructor and Description |
|---|
MutableFilter(MutableRel input,
RexNode condition) |
MutableJoin(RelDataType rowType,
MutableRel left,
MutableRel right,
RexNode condition,
JoinRelType joinType,
Set<CorrelationId> variablesSet) |
MutableSemiJoin(RelDataType rowType,
MutableRel left,
MutableRel right,
RexNode condition,
ImmutableIntList leftKeys,
ImmutableIntList rightKeys) |
MutableSort(MutableRel input,
RelCollation collation,
RexNode offset,
RexNode fetch) |
MutableTableFunctionScan(RelOptCluster cluster,
RelDataType rowType,
List<MutableRel> inputs,
RexNode rexCall,
Type elementType,
Set<RelColumnMapping> columnMappings) |
| Constructor and Description |
|---|
MutableProject(RelDataType rowType,
MutableRel input,
List<RexNode> projects) |
MutableTableModify(RelDataType rowType,
MutableRel input,
RelOptTable table,
Prepare.CatalogReader catalogReader,
TableModify.Operation operation,
List<String> updateColumnList,
List<RexNode> sourceExpressionList,
boolean flattened) |
| Modifier and Type | Method and Description |
|---|---|
private static RexNode |
SqlImplementor.stripCastFromString(RexNode node)
Removes cast from string.
|
| Modifier and Type | Method and Description |
|---|---|
static SqlNode |
SqlImplementor.convertConditionToSqlNode(RexNode node,
SqlImplementor.Context leftContext,
SqlImplementor.Context rightContext,
int leftFieldCount)
|
private static RexNode |
SqlImplementor.stripCastFromString(RexNode node)
Removes cast from string.
|
SqlNode |
SqlImplementor.Context.toSql(RexProgram program,
RexNode rex)
|
SqlNode |
SqlImplementor.MatchRecognizeContext.toSql(RexProgram program,
RexNode rex) |
| Modifier and Type | Method and Description |
|---|---|
private SqlNodeList |
RelToSqlConverter.exprList(SqlImplementor.Context context,
List<? extends RexNode> exprs)
|
static boolean |
SqlImplementor.isStar(List<RexNode> exps,
RelDataType inputRowType,
RelDataType projectRowType)
Returns whether a list of expressions projects all fields, in order,
from the input, with the same names.
|
private List<SqlNode> |
SqlImplementor.Context.toSql(RexProgram program,
List<RexNode> operandList) |
| Modifier and Type | Field and Description |
|---|---|
private RexNode[] |
CalcRelSplitter.InputToCommonExprConverter.allExprs |
(package private) RexNode |
LoptMultiJoin.Edge.condition |
private RexNode |
MultiJoin.joinFilter |
private RexNode |
PushProjector.origFilter |
private RexNode |
MultiJoin.postJoinFilter |
private RexNode |
SubQueryRemoveRule.ReplaceSubQueryShuttle.replacement |
| Modifier and Type | Field and Description |
|---|---|
private List<RexNode> |
LoptMultiJoin.allJoinFilters
All join filters associated with the MultiJoin, decomposed into a
list.
|
(package private) List<RexNode> |
PushProjector.childPreserveExprs
Expressions referenced in the projection/filter that should be preserved.
|
(package private) com.google.common.collect.ImmutableList<RexNode> |
MultiJoinOptimizeBushyRule.JoinVertex.conditions
Zero or more join conditions.
|
private com.google.common.collect.ImmutableMap<RexNode,RexNode> |
ReduceExpressionsRule.ReducibleExprLocator.constants |
private com.google.common.collect.ImmutableMap<RexNode,RexNode> |
ReduceExpressionsRule.ReducibleExprLocator.constants |
private List<RexNode> |
ReduceExpressionsRule.ReducibleExprLocator.constExprs |
private Map<RexNode,ImmutableBitSet> |
LoptMultiJoin.factorsRefByJoinFilter
For each join filter, associates a bitmap indicating all factors
referenced by the filter
|
private Map<RexNode,ImmutableBitSet> |
LoptMultiJoin.fieldsRefByJoinFilter
For each join filter, associates a bitmap indicating all fields
referenced by the filter
|
private Map<Pair<String,String>,RexNode> |
ReduceDecimalsRule.DecimalShuttle.irreducible |
private List<RexNode> |
LoptMultiJoin.joinFilters
Join filters associated with the MultiJoin, decomposed into a list.
|
(package private) List<RexNode> |
PushProjector.origProjExprs
Original projection expressions
|
private List<RexNode> |
MultiJoin.outerJoinConditions |
private List<RexNode> |
PushProjector.InputSpecialOpFinder.preserveLeft |
private List<RexNode> |
PushProjector.RefAndExprConverter.preserveLeft |
private List<RexNode> |
PushProjector.InputSpecialOpFinder.preserveRight |
private List<RexNode> |
PushProjector.RefAndExprConverter.preserveRight |
private List<RexNode> |
ReduceExpressionsRule.RexReplacer.reducedValues |
private List<RexNode> |
ReduceExpressionsRule.RexReplacer.reducibleExps |
private List<RexNode> |
ReduceExpressionsRule.ReducibleExprLocator.removableCasts |
private Map<Pair<String,String>,RexNode> |
ReduceDecimalsRule.DecimalShuttle.results |
(package private) List<RexNode> |
PushProjector.rightPreserveExprs
Expressions referenced in the projection/filter that should be preserved,
corresponding to expressions on the right hand side of the join, if the
projection is being pushed past a join.
|
| Modifier and Type | Method and Description |
|---|---|
static <C extends RexNode> |
ReduceExpressionsRule.predicateConstants(Class<C> clazz,
RexBuilder rexBuilder,
RelOptPredicateList predicates)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
protected RexNode |
ReduceDecimalsRule.RexExpander.accessValue(RexNode node)
Retrieves the primitive value of a numeric node.
|
private RexNode |
LoptOptimizeJoinRule.addFilters(LoptMultiJoin multiJoin,
LoptJoinTree leftTree,
int leftIdx,
LoptJoinTree rightTree,
List<RexNode> filtersToAdd,
boolean adjust)
Determines which join filters can be added to the current join tree.
|
private RexNode |
SemiJoinProjectTransposeRule.adjustCondition(LogicalProject project,
SemiJoin semiJoin)
Pulls the project above the semijoin and returns the resulting semijoin
condition.
|
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
|
private RexNode |
LoptSemiJoinOptimizer.adjustSemiJoinCondition(LoptMultiJoin multiJoin,
int leftAdjustment,
RexNode semiJoinCondition,
int leftIdx,
int rightIdx)
Modifies the semijoin condition to reflect the fact that the RHS is now
the second factor into a join and the LHS is the first
|
protected RexNode |
SubQueryRemoveRule.apply(RexSubQuery e,
Set<CorrelationId> variablesSet,
RelOptUtil.Logic logic,
RelBuilder builder,
int inputCount,
int offset) |
(package private) RexNode |
DateRangeRules.ExtractShuttle.compareExtract(SqlKind comparison,
RexNode operand,
RexLiteral literal) |
private RexNode |
DateRangeRules.ExtractShuttle.compareFloorCeil(SqlKind comparison,
RexNode operand,
RexLiteral timeLiteral,
org.apache.calcite.avatica.util.TimeUnitRange timeUnit,
boolean floor) |
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.
|
protected RexNode |
ReduceDecimalsRule.RexExpander.decodeValue(RexNode decimalNode)
Retrieves a decimal node's integer representation
|
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.ensureScale(RexNode value,
int scale,
int required)
Ensures a value is of a required scale.
|
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.
|
abstract RexNode |
ReduceDecimalsRule.RexExpander.expand(RexCall call)
Rewrites an expression containing decimals.
|
RexNode |
ReduceDecimalsRule.CastExpander.expand(RexCall call) |
RexNode |
ReduceDecimalsRule.BinaryArithmeticExpander.expand(RexCall call) |
RexNode |
ReduceDecimalsRule.FloorExpander.expand(RexCall call) |
RexNode |
ReduceDecimalsRule.CeilExpander.expand(RexCall call) |
RexNode |
ReduceDecimalsRule.CaseExpander.expand(RexCall call) |
RexNode |
ReduceDecimalsRule.PassThroughExpander.expand(RexCall call) |
RexNode |
ReduceDecimalsRule.CastArgAsTypeExpander.expand(RexCall call) |
RexNode |
ReduceDecimalsRule.ReinterpretExpander.expand(RexCall call) |
private RexNode |
ReduceDecimalsRule.BinaryArithmeticExpander.expandComparison(RexCall call,
List<RexNode> operands) |
private RexNode |
ReduceDecimalsRule.BinaryArithmeticExpander.expandDivide(RexCall call,
List<RexNode> operands) |
private RexNode |
ReduceDecimalsRule.BinaryArithmeticExpander.expandMod(RexCall call,
List<RexNode> operands) |
private RexNode |
ReduceDecimalsRule.BinaryArithmeticExpander.expandPlusMinus(RexCall call,
List<RexNode> operands) |
private RexNode |
ReduceDecimalsRule.BinaryArithmeticExpander.expandTimes(RexCall call,
List<RexNode> operands) |
private static RexNode |
AbstractMaterializedViewRule.generateEquivalenceClasses(RexBuilder rexBuilder,
AbstractMaterializedViewRule.EquivalenceClasses sourceEC,
AbstractMaterializedViewRule.EquivalenceClasses targetEC)
Given the equi-column predicates of the source and the target and the
computed equivalence classes, it extracts possible mappings between
the equivalence classes.
|
RexNode |
MultiJoin.getJoinFilter() |
RexNode |
LoptMultiJoin.getOuterJoinCond(int factIdx) |
RexNode |
MultiJoin.getPostJoinFilter() |
RexNode |
JoinCommuteRule.VariableReplacer.go(RexNode rex) |
private RexNode |
ReduceDecimalsRule.DecimalShuttle.lookup(RexNode node)
Lookup registered node
|
protected RexNode |
ReduceDecimalsRule.RexExpander.makeApproxLiteral(BigDecimal bd)
Makes an approximate literal of double precision
|
protected RexNode |
ReduceDecimalsRule.RexExpander.makeApproxScaleFactor(int scale)
Makes an approximate literal to be used for scaling
|
protected RexNode |
ReduceDecimalsRule.RexExpander.makeCase(RexNode condition,
RexNode thenClause,
RexNode elseClause) |
protected RexNode |
ReduceDecimalsRule.RexExpander.makeCase(RexNode whenA,
RexNode thenA,
RexNode whenB,
RexNode thenB,
RexNode elseClause) |
protected RexNode |
ReduceDecimalsRule.RexExpander.makeDivide(RexNode a,
RexNode b) |
protected RexNode |
ReduceDecimalsRule.RexExpander.makeExactLiteral(long l)
Makes an exact, non-nullable literal of Bigint type
|
protected RexNode |
ReduceDecimalsRule.RexExpander.makeIsNegative(RexNode a) |
protected RexNode |
ReduceDecimalsRule.RexExpander.makeIsPositive(RexNode a) |
protected RexNode |
ReduceDecimalsRule.RexExpander.makeMinus(RexNode a,
RexNode b) |
protected RexNode |
ReduceDecimalsRule.RexExpander.makeMultiply(RexNode a,
RexNode b) |
protected RexNode |
ReduceDecimalsRule.RexExpander.makePlus(RexNode a,
RexNode b) |
protected RexNode |
ReduceDecimalsRule.RexExpander.makeRoundFactor(int scale)
Makes an exact numeric value to be used for rounding.
|
protected RexNode |
ReduceDecimalsRule.RexExpander.makeScaleFactor(int scale)
Makes an exact numeric literal to be used for scaling
|
private RexNode |
AggregateReduceFunctionsRule.reduceAgg(Aggregate oldAggRel,
AggregateCall oldCall,
List<AggregateCall> newCalls,
Map<AggregateCall,RexNode> aggCallMapping,
List<RexNode> inputExprs) |
private RexNode |
AggregateReduceFunctionsRule.reduceAvg(Aggregate oldAggRel,
AggregateCall oldCall,
List<AggregateCall> newCalls,
Map<AggregateCall,RexNode> aggCallMapping,
List<RexNode> inputExprs) |
private RexNode |
AggregateReduceFunctionsRule.reduceStddev(Aggregate oldAggRel,
AggregateCall oldCall,
boolean biased,
boolean sqrt,
List<AggregateCall> newCalls,
Map<AggregateCall,RexNode> aggCallMapping,
List<RexNode> inputExprs) |
private RexNode |
AggregateReduceFunctionsRule.reduceSum(Aggregate oldAggRel,
AggregateCall oldCall,
List<AggregateCall> newCalls,
Map<AggregateCall,RexNode> aggCallMapping) |
private RexNode |
LoptSemiJoinOptimizer.removeExtraFilters(List<Integer> keys,
int nFields,
RexNode condition)
Removes from an expression any sub-expressions that reference key values
that aren't contained in a key list passed in.
|
static RexNode |
DateRangeRules.replaceTimeUnits(RexBuilder rexBuilder,
RexNode e,
String timeZone)
Replaces calls to EXTRACT, FLOOR and CEIL in an expression.
|
private static RexNode |
AbstractMaterializedViewRule.replaceWithOriginalReferences(RexBuilder rexBuilder,
RelNode node,
AbstractMaterializedViewRule.NodeLineage nodeLineage,
RexNode exprToRewrite)
Given the input expression, it will replace (sub)expressions when possible
using the content of the mapping.
|
private RexNode |
ReduceDecimalsRule.DecimalShuttle.rewriteCall(RexCall call)
Rewrites a call, if required, or returns the original call
|
private static RexNode |
AbstractMaterializedViewRule.rewriteExpression(RexBuilder rexBuilder,
RelMetadataQuery mq,
RelNode targetNode,
RelNode node,
List<RexNode> nodeExprs,
com.google.common.collect.BiMap<RexTableInputRef.RelTableRef,RexTableInputRef.RelTableRef> tableMapping,
AbstractMaterializedViewRule.EquivalenceClasses ec,
boolean swapTableColumn,
RexNode exprToRewrite)
First, the method takes the node expressions
nodeExprs and swaps the table
and column references using the table mapping and the equivalence classes. |
protected RexNode |
ReduceDecimalsRule.RexExpander.scaleDown(RexNode value,
int scale)
Scales down a decimal value, and returns the scaled value as an exact
numeric.
|
protected RexNode |
ReduceDecimalsRule.RexExpander.scaleDownDouble(RexNode value,
int scale)
Scales down a decimal value and returns the scaled value as a an
double precision approximate value.
|
protected RexNode |
ReduceDecimalsRule.RexExpander.scaleUp(RexNode value,
int scale)
Scales up a decimal value and returns the scaled value as an exact
number.
|
private RexNode |
JoinToMultiJoinRule.shiftRightFilter(Join joinRel,
RelNode left,
MultiJoin right,
RexNode rightFilter)
Shifts a filter originating from the right child of the LogicalJoin to the
right, to reflect the filter now being applied on the resulting
MultiJoin.
|
private static RexNode |
AbstractMaterializedViewRule.shuttleReferences(RexBuilder rexBuilder,
RexNode node,
Mapping mapping)
Replaces all the input references by the position in the
input column set.
|
private static RexNode |
AbstractMaterializedViewRule.shuttleReferences(RexBuilder rexBuilder,
RexNode expr,
com.google.common.collect.Multimap<String,Integer> exprsLineage)
Replaces all the possible subexpressions by input references
to the input node.
|
private static RexNode |
AbstractMaterializedViewRule.shuttleReferences(RexBuilder rexBuilder,
RexNode expr,
com.google.common.collect.Multimap<String,Integer> exprsLineage,
RelNode node,
Mapping rewritingMapping)
Replaces all the possible subexpressions by input references
to the input node.
|
protected static RexNode |
ReduceExpressionsRule.substitute(RexCall call,
int ordinal,
RexNode node)
Converts op(arg0, ..., argOrdinal, ..., argN) to op(arg0,..., node, ..., argN).
|
private RexNode |
LoptOptimizeJoinRule.swapFilter(RexBuilder rexBuilder,
LoptMultiJoin multiJoin,
LoptJoinTree origLeft,
LoptJoinTree origRight,
RexNode condition)
Adjusts a filter to reflect swapping of join inputs
|
private RexNode |
DateRangeRules.ExtractShuttle.toRex(RexNode operand,
com.google.common.collect.Range<Calendar> r) |
private RexNode |
ReduceExpressionsRule.RexReplacer.visit(RexNode call) |
RexNode |
ReduceDecimalsRule.DecimalShuttle.visitCall(RexCall call)
Rewrites a call in place, from bottom up, as follows:
visit operands
visit call node
rewrite call
visit the rewritten call
|
RexNode |
DateRangeRules.ExtractShuttle.visitCall(RexCall call) |
RexNode |
FilterRemoveIsNotDistinctFromRule.RemoveIsNotDistinctFromRexShuttle.visitCall(RexCall call) |
RexNode |
ReduceExpressionsRule.RexReplacer.visitCall(RexCall call) |
RexNode |
ReduceExpressionsRule.CaseShuttle.visitCall(RexCall call) |
RexNode |
PushProjector.RefAndExprConverter.visitCall(RexCall call) |
RexNode |
ReduceExpressionsRule.RexReplacer.visitInputRef(RexInputRef inputRef) |
RexNode |
CalcRelSplitter.InputToCommonExprConverter.visitInputRef(RexInputRef input) |
RexNode |
ValuesReduceRule.MyRexShuttle.visitInputRef(RexInputRef inputRef) |
RexNode |
CalcRelSplitter.InputToCommonExprConverter.visitLocalRef(RexLocalRef local) |
RexNode |
SubQueryRemoveRule.ReplaceSubQueryShuttle.visitSubQuery(RexSubQuery subQuery) |
| Modifier and Type | Method and Description |
|---|---|
private List<RexNode> |
JoinToMultiJoinRule.combineJoinFilters(Join joinRel,
RelNode left,
RelNode right)
Combines the join filters from the left and right inputs (if they are
MultiJoinRels) with the join filter in the joinrel into a single AND'd
join filter, unless the inputs correspond to null generating inputs in an
outer join
|
private List<RexNode> |
JoinToMultiJoinRule.combinePostJoinFilters(Join joinRel,
RelNode left,
RelNode right)
Combines the post-join filters from the left and right inputs (if they
are MultiJoinRels) into a single AND'd filter.
|
private static org.apache.commons.lang3.tuple.Triple<RexNode,RexNode,RexNode> |
AbstractMaterializedViewRule.computeCompensationPredicates(RexBuilder rexBuilder,
RexSimplify simplify,
AbstractMaterializedViewRule.EquivalenceClasses sourceEC,
org.apache.commons.lang3.tuple.Triple<RexNode,RexNode,RexNode> sourcePreds,
AbstractMaterializedViewRule.EquivalenceClasses targetEC,
org.apache.commons.lang3.tuple.Triple<RexNode,RexNode,RexNode> targetPreds,
com.google.common.collect.BiMap<RexTableInputRef.RelTableRef,RexTableInputRef.RelTableRef> sourceToTargetTableMapping)
We check whether the predicates in the source are contained in the predicates
in the target.
|
private static org.apache.commons.lang3.tuple.Triple<RexNode,RexNode,RexNode> |
AbstractMaterializedViewRule.computeCompensationPredicates(RexBuilder rexBuilder,
RexSimplify simplify,
AbstractMaterializedViewRule.EquivalenceClasses sourceEC,
org.apache.commons.lang3.tuple.Triple<RexNode,RexNode,RexNode> sourcePreds,
AbstractMaterializedViewRule.EquivalenceClasses targetEC,
org.apache.commons.lang3.tuple.Triple<RexNode,RexNode,RexNode> targetPreds,
com.google.common.collect.BiMap<RexTableInputRef.RelTableRef,RexTableInputRef.RelTableRef> sourceToTargetTableMapping)
We check whether the predicates in the source are contained in the predicates
in the target.
|
private static org.apache.commons.lang3.tuple.Triple<RexNode,RexNode,RexNode> |
AbstractMaterializedViewRule.computeCompensationPredicates(RexBuilder rexBuilder,
RexSimplify simplify,
AbstractMaterializedViewRule.EquivalenceClasses sourceEC,
org.apache.commons.lang3.tuple.Triple<RexNode,RexNode,RexNode> sourcePreds,
AbstractMaterializedViewRule.EquivalenceClasses targetEC,
org.apache.commons.lang3.tuple.Triple<RexNode,RexNode,RexNode> targetPreds,
com.google.common.collect.BiMap<RexTableInputRef.RelTableRef,RexTableInputRef.RelTableRef> sourceToTargetTableMapping)
We check whether the predicates in the source are contained in the predicates
in the target.
|
private static List<RexNode> |
AbstractMaterializedViewRule.extractReferences(RexBuilder rexBuilder,
RelNode node)
If the node is an Aggregate, it returns a list of references to the grouping columns.
|
private static List<RexNode> |
SubQueryRemoveRule.fields(RelBuilder builder,
int fieldCount)
Returns a list of expressions that project the first
fieldCount
fields of the top input on a RelBuilder's stack. |
List<RexNode> |
MultiJoin.getChildExps() |
List<RexNode> |
LoptMultiJoin.getJoinFilters() |
List<RexNode> |
MultiJoin.getOuterJoinConditions() |
static <C extends RexNode> |
ReduceExpressionsRule.predicateConstants(Class<C> clazz,
RexBuilder rexBuilder,
RelOptPredicateList predicates)
Deprecated.
|
private static List<RexNode> |
AbstractMaterializedViewRule.rewriteExpressions(RexBuilder rexBuilder,
RelMetadataQuery mq,
RelNode targetNode,
RelNode node,
List<RexNode> nodeExprs,
com.google.common.collect.BiMap<RexTableInputRef.RelTableRef,RexTableInputRef.RelTableRef> tableMapping,
AbstractMaterializedViewRule.EquivalenceClasses ec,
boolean swapTableColumn,
List<RexNode> exprsToRewrite)
First, the method takes the node expressions
nodeExprs and swaps the table
and column references using the table mapping and the equivalence classes. |
private static org.apache.commons.lang3.tuple.Triple<RexNode,RexNode,RexNode> |
AbstractMaterializedViewRule.splitPredicates(RexBuilder rexBuilder,
RexNode pred)
Classifies each of the predicates in the list into one of these three
categories:
1-l) column equality predicates, or
2-m) range predicates, comprising <, ≤, >, ≥, and =
between a reference and a constant, or
3-r) residual predicates, all the rest
|
private static org.apache.commons.lang3.tuple.Triple<RexNode,RexNode,RexNode> |
AbstractMaterializedViewRule.splitPredicates(RexBuilder rexBuilder,
RexNode pred)
Classifies each of the predicates in the list into one of these three
categories:
1-l) column equality predicates, or
2-m) range predicates, comprising <, ≤, >, ≥, and =
between a reference and a constant, or
3-r) residual predicates, all the rest
|
private static org.apache.commons.lang3.tuple.Triple<RexNode,RexNode,RexNode> |
AbstractMaterializedViewRule.splitPredicates(RexBuilder rexBuilder,
RexNode pred)
Classifies each of the predicates in the list into one of these three
categories:
1-l) column equality predicates, or
2-m) range predicates, comprising <, ≤, >, ≥, and =
between a reference and a constant, or
3-r) residual predicates, all the rest
|
protected List<RexNode> |
DateRangeRules.ExtractShuttle.visitList(List<? extends RexNode> exprs,
boolean[] update) |
| Modifier and Type | Method and Description |
|---|---|
protected RexNode |
ReduceDecimalsRule.RexExpander.accessValue(RexNode node)
Retrieves the primitive value of a numeric node.
|
private void |
PushProjector.InputSpecialOpFinder.addExpr(List<RexNode> exprList,
RexNode newExpr)
Adds an expression to a list if the same expression isn't already in
the list.
|
private com.google.common.collect.ImmutableMap<Integer,ImmutableIntList> |
JoinToMultiJoinRule.addOnJoinFieldRefCounts(List<RelNode> multiJoinInputs,
int nTotalFields,
RexNode joinCondition,
List<int[]> origJoinFieldRefCounts)
Adds on to the existing join condition reference counts the references
from the new join condition.
|
private void |
ReduceExpressionsRule.ReducibleExprLocator.addResult(RexNode exp) |
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
|
private RexNode |
LoptSemiJoinOptimizer.adjustSemiJoinCondition(LoptMultiJoin multiJoin,
int leftAdjustment,
RexNode semiJoinCondition,
int leftIdx,
int rightIdx)
Modifies the semijoin condition to reflect the fact that the RHS is now
the second factor into a join and the LHS is the first
|
void |
ReduceExpressionsRule.ReducibleExprLocator.analyze(RexNode exp) |
boolean |
FilterJoinRule.Predicate.apply(Join join,
JoinRelType joinType,
RexNode exp) |
private static boolean |
LoptOptimizeJoinRule.areSelfJoinKeysUnique(RelMetadataQuery mq,
RelNode leftRel,
RelNode rightRel,
RexNode joinFilters)
Determines if the equality portion of a self-join condition is between
identical keys that are unique.
|
boolean |
CalcRelSplitter.RelType.canImplement(RexNode expr,
boolean condition)
Returns whether this
RelType can implement a given
expression. |
private boolean |
DateRangeRules.ExtractShuttle.canRewriteExtract(RexNode operand) |
private boolean |
ReduceDecimalsRule.ReinterpretExpander.canSimplify(RexCall outer,
RexCall inner,
RexNode value)
Detect, in a generic, but strict way, whether it is possible to
simplify a reinterpret cast.
|
private int |
CalcRelSplitter.chooseLevels(RexNode[] exprs,
int conditionOrdinal,
int[] exprLevels,
int[] levelTypeOrdinals)
Figures out which expressions to calculate at which level.
|
(package private) RexNode |
DateRangeRules.ExtractShuttle.compareExtract(SqlKind comparison,
RexNode operand,
RexLiteral literal) |
private RexNode |
DateRangeRules.ExtractShuttle.compareFloorCeil(SqlKind comparison,
RexNode operand,
RexLiteral timeLiteral,
org.apache.calcite.avatica.util.TimeUnitRange timeUnit,
boolean floor) |
private List<Integer> |
CalcRelSplitter.computeTopologicalOrdering(RexNode[] exprs,
List<Set<Integer>> cohorts)
Computes the order in which to visit expressions, so that we decide the
level of an expression only after the levels of lower expressions have
been decided.
|
RelNode |
PushProjector.convertProject(RexNode defaultExpr)
Decomposes a projection to the input references referenced by a
projection and a filter, either of which is optional.
|
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.
|
LoptMultiJoin.Edge |
LoptMultiJoin.createEdge(RexNode condition) |
private LoptJoinTree |
LoptOptimizeJoinRule.createJoinSubtree(RelMetadataQuery mq,
RelBuilder relBuilder,
LoptMultiJoin multiJoin,
LoptJoinTree left,
LoptJoinTree right,
RexNode condition,
JoinRelType joinType,
List<RexNode> filtersToAdd,
boolean fullAdjust,
boolean selfJoin)
Creates a LogicalJoin given left and right operands and a join condition.
|
private RexProgram |
CalcRelSplitter.createProgramForLevel(int level,
int levelCount,
RelDataType inputRowType,
RexNode[] allExprs,
int[] exprLevels,
int[] inputExprOrdinals,
int[] projectExprOrdinals,
int conditionExprOrdinal,
RelDataType outputRowType)
Creates a program containing the expressions for a given level.
|
private RexLiteral |
DateRangeRules.ExtractShuttle.dateTimeLiteral(RexBuilder rexBuilder,
Calendar calendar,
RexNode operand) |
protected RexNode |
ReduceDecimalsRule.RexExpander.decodeValue(RexNode decimalNode)
Retrieves a decimal node's integer representation
|
private String |
CalcRelSplitter.deriveFieldName(RexNode expr,
int ordinal) |
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.ensureScale(RexNode value,
int scale,
int required)
Ensures a value is of a required scale.
|
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.
|
(package private) static com.google.common.collect.ImmutableSortedSet<org.apache.calcite.avatica.util.TimeUnitRange> |
DateRangeRules.extractTimeUnits(RexNode e)
Tests whether an expression contains one or more calls to the
EXTRACT function, and if so, returns the time units used. |
private ImmutableBitSet |
LoptMultiJoin.fieldBitmap(RexNode joinFilter) |
private int |
PushProjector.RefAndExprConverter.findExprInList(RexNode rex,
List<RexNode> rexList) |
private int |
PushProjector.RefAndExprConverter.findExprInLists(RexNode rex,
List<RexNode> rexList1,
int adjust1,
List<RexNode> rexList2,
int adjust2)
Looks for a matching RexNode from among two lists of RexNodes and
returns the offset into the list corresponding to the match, adjusted
by an amount, depending on whether the match was from the first or
second list.
|
ImmutableBitSet |
LoptMultiJoin.getFactorsRefByJoinFilter(RexNode joinFilter) |
ImmutableBitSet |
LoptMultiJoin.getFieldsRefByJoinFilter(RexNode joinFilter) |
(package private) ImmutableBitSet |
LoptMultiJoin.getJoinFilterFactorBitmap(RexNode joinFilter,
boolean setFields)
Returns a bitmap representing the factors referenced in a join filter
|
RexNode |
JoinCommuteRule.VariableReplacer.go(RexNode rex) |
(package private) boolean |
DateRangeRules.ExtractShuttle.isExtractCall(RexNode e) |
(package private) boolean |
DateRangeRules.ExtractShuttle.isFloorCeilCall(RexNode e) |
private boolean |
PushProjector.InputSpecialOpFinder.isStrong(ImmutableBitSet exprArgs,
RexNode call) |
private int |
LoptSemiJoinOptimizer.isSuitableFilter(LoptMultiJoin multiJoin,
RexNode joinFilter,
int factIdx)
Determines if a join filter can be used with a semijoin against a
specified fact table.
|
private RexNode |
ReduceDecimalsRule.DecimalShuttle.lookup(RexNode node)
Lookup registered node
|
protected RexNode |
ReduceDecimalsRule.RexExpander.makeCase(RexNode condition,
RexNode thenClause,
RexNode elseClause) |
protected RexNode |
ReduceDecimalsRule.RexExpander.makeCase(RexNode whenA,
RexNode thenA,
RexNode whenB,
RexNode thenB,
RexNode elseClause) |
protected RexNode |
ReduceDecimalsRule.RexExpander.makeDivide(RexNode a,
RexNode b) |
protected RexNode |
ReduceDecimalsRule.RexExpander.makeIsNegative(RexNode a) |
protected RexNode |
ReduceDecimalsRule.RexExpander.makeIsPositive(RexNode a) |
protected RexNode |
ReduceDecimalsRule.RexExpander.makeMinus(RexNode a,
RexNode b) |
protected RexNode |
ReduceDecimalsRule.RexExpander.makeMultiply(RexNode a,
RexNode b) |
protected RexNode |
ReduceDecimalsRule.RexExpander.makePlus(RexNode a,
RexNode b) |
int |
CalcRelSplitter.MaxInputFinder.maxInputFor(RexNode expr)
Returns the highest level of any of the inputs of an expression.
|
private static void |
AggregateJoinTransposeRule.populateEquivalences(Map<Integer,BitSet> equivalence,
RexNode predicate) |
private boolean |
PushProjector.InputSpecialOpFinder.preserve(RexNode call) |
protected abstract Pair<RelNode,RelNode> |
AbstractMaterializedViewRule.pushFilterToOriginalViewPlan(RelBuilder builder,
RelNode topViewProject,
RelNode viewNode,
RexNode cond)
Once we create a compensation predicate, this method is responsible for pushing
the resulting filter through the view nodes.
|
Pair<RelNode,RelNode> |
AbstractMaterializedViewRule.MaterializedViewJoinRule.pushFilterToOriginalViewPlan(RelBuilder builder,
RelNode topViewProject,
RelNode viewNode,
RexNode cond) |
Pair<RelNode,RelNode> |
AbstractMaterializedViewRule.MaterializedViewAggregateRule.pushFilterToOriginalViewPlan(RelBuilder builder,
RelNode topViewProject,
RelNode viewNode,
RexNode cond) |
private void |
ReduceExpressionsRule.FilterReduceExpressionsRule.reduceNotNullableFilter(RelOptRuleCall call,
Filter filter,
RexNode rexNode,
boolean reverse) |
private void |
ReduceDecimalsRule.DecimalShuttle.register(RexNode node,
RexNode reducedNode)
Registers node so it will not be computed again
|
private RexNode |
LoptSemiJoinOptimizer.removeExtraFilters(List<Integer> keys,
int nFields,
RexNode condition)
Removes from an expression any sub-expressions that reference key values
that aren't contained in a key list passed in.
|
static RexNode |
DateRangeRules.replaceTimeUnits(RexBuilder rexBuilder,
RexNode e,
String timeZone)
Replaces calls to EXTRACT, FLOOR and CEIL in an expression.
|
private static RexNode |
AbstractMaterializedViewRule.replaceWithOriginalReferences(RexBuilder rexBuilder,
RelNode node,
AbstractMaterializedViewRule.NodeLineage nodeLineage,
RexNode exprToRewrite)
Given the input expression, it will replace (sub)expressions when possible
using the content of the mapping.
|
private static RexNode |
AbstractMaterializedViewRule.rewriteExpression(RexBuilder rexBuilder,
RelMetadataQuery mq,
RelNode targetNode,
RelNode node,
List<RexNode> nodeExprs,
com.google.common.collect.BiMap<RexTableInputRef.RelTableRef,RexTableInputRef.RelTableRef> tableMapping,
AbstractMaterializedViewRule.EquivalenceClasses ec,
boolean swapTableColumn,
RexNode exprToRewrite)
First, the method takes the node expressions
nodeExprs and swaps the table
and column references using the table mapping and the equivalence classes. |
protected abstract RelNode |
AbstractMaterializedViewRule.rewriteQuery(RelBuilder relBuilder,
RexBuilder rexBuilder,
RexSimplify simplify,
RelMetadataQuery mq,
RexNode compensationColumnsEquiPred,
RexNode otherCompensationPred,
Project topProject,
RelNode node,
com.google.common.collect.BiMap<RexTableInputRef.RelTableRef,RexTableInputRef.RelTableRef> viewToQueryTableMapping,
AbstractMaterializedViewRule.EquivalenceClasses viewEC,
AbstractMaterializedViewRule.EquivalenceClasses queryEC)
If the view will be used in a union rewriting, this method is responsible for
rewriting the query branch of the union using the given compensation predicate.
|
protected RelNode |
AbstractMaterializedViewRule.MaterializedViewJoinRule.rewriteQuery(RelBuilder relBuilder,
RexBuilder rexBuilder,
RexSimplify simplify,
RelMetadataQuery mq,
RexNode compensationColumnsEquiPred,
RexNode otherCompensationPred,
Project topProject,
RelNode node,
com.google.common.collect.BiMap<RexTableInputRef.RelTableRef,RexTableInputRef.RelTableRef> viewToQueryTableMapping,
AbstractMaterializedViewRule.EquivalenceClasses viewEC,
AbstractMaterializedViewRule.EquivalenceClasses queryEC) |
protected RelNode |
AbstractMaterializedViewRule.MaterializedViewAggregateRule.rewriteQuery(RelBuilder relBuilder,
RexBuilder rexBuilder,
RexSimplify simplify,
RelMetadataQuery mq,
RexNode compensationColumnsEquiPred,
RexNode otherCompensationPred,
Project topProject,
RelNode node,
com.google.common.collect.BiMap<RexTableInputRef.RelTableRef,RexTableInputRef.RelTableRef> queryToViewTableMapping,
AbstractMaterializedViewRule.EquivalenceClasses viewEC,
AbstractMaterializedViewRule.EquivalenceClasses queryEC) |
protected RexNode |
ReduceDecimalsRule.RexExpander.scaleDown(RexNode value,
int scale)
Scales down a decimal value, and returns the scaled value as an exact
numeric.
|
protected RexNode |
ReduceDecimalsRule.RexExpander.scaleDownDouble(RexNode value,
int scale)
Scales down a decimal value and returns the scaled value as a an
double precision approximate value.
|
protected RexNode |
ReduceDecimalsRule.RexExpander.scaleUp(RexNode value,
int scale)
Scales up a decimal value and returns the scaled value as an exact
number.
|
private RexNode |
JoinToMultiJoinRule.shiftRightFilter(Join joinRel,
RelNode left,
MultiJoin right,
RexNode rightFilter)
Shifts a filter originating from the right child of the LogicalJoin to the
right, to reflect the filter now being applied on the resulting
MultiJoin.
|
private static RexNode |
AbstractMaterializedViewRule.shuttleReferences(RexBuilder rexBuilder,
RexNode node,
Mapping mapping)
Replaces all the input references by the position in the
input column set.
|
private static RexNode |
AbstractMaterializedViewRule.shuttleReferences(RexBuilder rexBuilder,
RexNode expr,
com.google.common.collect.Multimap<String,Integer> exprsLineage)
Replaces all the possible subexpressions by input references
to the input node.
|
private static RexNode |
AbstractMaterializedViewRule.shuttleReferences(RexBuilder rexBuilder,
RexNode expr,
com.google.common.collect.Multimap<String,Integer> exprsLineage,
RelNode node,
Mapping rewritingMapping)
Replaces all the possible subexpressions by input references
to the input node.
|
(package private) static void |
JoinPushThroughJoinRule.split(RexNode condition,
ImmutableBitSet bitSet,
List<RexNode> intersecting,
List<RexNode> nonIntersecting)
Splits a condition into conjunctions that do or do not intersect with
a given bit set.
|
private static org.apache.commons.lang3.tuple.Triple<RexNode,RexNode,RexNode> |
AbstractMaterializedViewRule.splitPredicates(RexBuilder rexBuilder,
RexNode pred)
Classifies each of the predicates in the list into one of these three
categories:
1-l) column equality predicates, or
2-m) range predicates, comprising <, ≤, >, ≥, and =
between a reference and a constant, or
3-r) residual predicates, all the rest
|
protected static RexNode |
ReduceExpressionsRule.substitute(RexCall call,
int ordinal,
RexNode node)
Converts op(arg0, ..., argOrdinal, ..., argN) to op(arg0,..., node, ..., argN).
|
private RexNode |
LoptOptimizeJoinRule.swapFilter(RexBuilder rexBuilder,
LoptMultiJoin multiJoin,
LoptJoinTree origLeft,
LoptJoinTree origRight,
RexNode condition)
Adjusts a filter to reflect swapping of join inputs
|
boolean |
PushProjector.ExprCondition.test(RexNode expr)
Evaluates a condition for a given expression.
|
boolean |
PushProjector.OperatorExprCondition.test(RexNode expr) |
private RexNode |
DateRangeRules.ExtractShuttle.toRex(RexNode operand,
com.google.common.collect.Range<Calendar> r) |
private void |
CalcRelSplitter.traceLevelExpressions(RexNode[] exprs,
int[] exprLevels,
int[] levelTypeOrdinals,
int levelCount)
Traces the given array of level expression lists at the finer level.
|
private RexNode |
ReduceExpressionsRule.RexReplacer.visit(RexNode call) |
| Modifier and Type | Method and Description |
|---|---|
private void |
LoptOptimizeJoinRule.addAdditionalFilters(RelBuilder relBuilder,
LoptMultiJoin multiJoin,
LoptJoinTree left,
LoptJoinTree right,
List<RexNode> filtersToAdd)
Determines whether any additional filters are applicable to a join tree.
|
private void |
PushProjector.InputSpecialOpFinder.addExpr(List<RexNode> exprList,
RexNode newExpr)
Adds an expression to a list if the same expression isn't already in
the list.
|
private LoptJoinTree |
LoptOptimizeJoinRule.addFactorToTree(RelMetadataQuery mq,
RelBuilder relBuilder,
LoptMultiJoin multiJoin,
LoptSemiJoinOptimizer semiJoinOpt,
LoptJoinTree joinTree,
int factorToAdd,
BitSet factorsNeeded,
List<RexNode> filtersToAdd,
boolean selfJoin)
Adds a new factor into the current join tree.
|
private RexNode |
LoptOptimizeJoinRule.addFilters(LoptMultiJoin multiJoin,
LoptJoinTree leftTree,
int leftIdx,
LoptJoinTree rightTree,
List<RexNode> filtersToAdd,
boolean adjust)
Determines which join filters can be added to the current join tree.
|
private LoptJoinTree |
LoptOptimizeJoinRule.addToTop(RelMetadataQuery mq,
RelBuilder relBuilder,
LoptMultiJoin multiJoin,
LoptSemiJoinOptimizer semiJoinOpt,
LoptJoinTree joinTree,
int factorToAdd,
List<RexNode> filtersToAdd,
boolean selfJoin)
Creates a join tree with the new factor added to the top of the tree
|
private void |
ReduceDecimalsRule.BinaryArithmeticExpander.analyzeOperands(List<RexNode> operands)
Convenience method for reading characteristics of operands (such as
scale, precision, whole digits) into an ArithmeticExpander.
|
private void |
JoinToMultiJoinRule.combineOuterJoins(Join joinRel,
List<RelNode> combinedInputs,
RelNode left,
RelNode right,
List<Pair<JoinRelType,RexNode>> joinSpecs)
Combines the outer join conditions and join types from the left and right
join inputs.
|
private static org.apache.commons.lang3.tuple.Triple<RexNode,RexNode,RexNode> |
AbstractMaterializedViewRule.computeCompensationPredicates(RexBuilder rexBuilder,
RexSimplify simplify,
AbstractMaterializedViewRule.EquivalenceClasses sourceEC,
org.apache.commons.lang3.tuple.Triple<RexNode,RexNode,RexNode> sourcePreds,
AbstractMaterializedViewRule.EquivalenceClasses targetEC,
org.apache.commons.lang3.tuple.Triple<RexNode,RexNode,RexNode> targetPreds,
com.google.common.collect.BiMap<RexTableInputRef.RelTableRef,RexTableInputRef.RelTableRef> sourceToTargetTableMapping)
We check whether the predicates in the source are contained in the predicates
in the target.
|
private static org.apache.commons.lang3.tuple.Triple<RexNode,RexNode,RexNode> |
AbstractMaterializedViewRule.computeCompensationPredicates(RexBuilder rexBuilder,
RexSimplify simplify,
AbstractMaterializedViewRule.EquivalenceClasses sourceEC,
org.apache.commons.lang3.tuple.Triple<RexNode,RexNode,RexNode> sourcePreds,
AbstractMaterializedViewRule.EquivalenceClasses targetEC,
org.apache.commons.lang3.tuple.Triple<RexNode,RexNode,RexNode> targetPreds,
com.google.common.collect.BiMap<RexTableInputRef.RelTableRef,RexTableInputRef.RelTableRef> sourceToTargetTableMapping)
We check whether the predicates in the source are contained in the predicates
in the target.
|
private static org.apache.commons.lang3.tuple.Triple<RexNode,RexNode,RexNode> |
AbstractMaterializedViewRule.computeCompensationPredicates(RexBuilder rexBuilder,
RexSimplify simplify,
AbstractMaterializedViewRule.EquivalenceClasses sourceEC,
org.apache.commons.lang3.tuple.Triple<RexNode,RexNode,RexNode> sourcePreds,
AbstractMaterializedViewRule.EquivalenceClasses targetEC,
org.apache.commons.lang3.tuple.Triple<RexNode,RexNode,RexNode> targetPreds,
com.google.common.collect.BiMap<RexTableInputRef.RelTableRef,RexTableInputRef.RelTableRef> sourceToTargetTableMapping)
We check whether the predicates in the source are contained in the predicates
in the target.
|
private static org.apache.commons.lang3.tuple.Triple<RexNode,RexNode,RexNode> |
AbstractMaterializedViewRule.computeCompensationPredicates(RexBuilder rexBuilder,
RexSimplify simplify,
AbstractMaterializedViewRule.EquivalenceClasses sourceEC,
org.apache.commons.lang3.tuple.Triple<RexNode,RexNode,RexNode> sourcePreds,
AbstractMaterializedViewRule.EquivalenceClasses targetEC,
org.apache.commons.lang3.tuple.Triple<RexNode,RexNode,RexNode> targetPreds,
com.google.common.collect.BiMap<RexTableInputRef.RelTableRef,RexTableInputRef.RelTableRef> sourceToTargetTableMapping)
We check whether the predicates in the source are contained in the predicates
in the target.
|
private static org.apache.commons.lang3.tuple.Triple<RexNode,RexNode,RexNode> |
AbstractMaterializedViewRule.computeCompensationPredicates(RexBuilder rexBuilder,
RexSimplify simplify,
AbstractMaterializedViewRule.EquivalenceClasses sourceEC,
org.apache.commons.lang3.tuple.Triple<RexNode,RexNode,RexNode> sourcePreds,
AbstractMaterializedViewRule.EquivalenceClasses targetEC,
org.apache.commons.lang3.tuple.Triple<RexNode,RexNode,RexNode> targetPreds,
com.google.common.collect.BiMap<RexTableInputRef.RelTableRef,RexTableInputRef.RelTableRef> sourceToTargetTableMapping)
We check whether the predicates in the source are contained in the predicates
in the target.
|
private static org.apache.commons.lang3.tuple.Triple<RexNode,RexNode,RexNode> |
AbstractMaterializedViewRule.computeCompensationPredicates(RexBuilder rexBuilder,
RexSimplify simplify,
AbstractMaterializedViewRule.EquivalenceClasses sourceEC,
org.apache.commons.lang3.tuple.Triple<RexNode,RexNode,RexNode> sourcePreds,
AbstractMaterializedViewRule.EquivalenceClasses targetEC,
org.apache.commons.lang3.tuple.Triple<RexNode,RexNode,RexNode> targetPreds,
com.google.common.collect.BiMap<RexTableInputRef.RelTableRef,RexTableInputRef.RelTableRef> sourceToTargetTableMapping)
We check whether the predicates in the source are contained in the predicates
in the target.
|
private Double |
LoptOptimizeJoinRule.computeJoinCardinality(RelMetadataQuery mq,
LoptMultiJoin multiJoin,
LoptSemiJoinOptimizer semiJoinOpt,
LoptJoinTree joinTree,
List<RexNode> filters,
int factor)
Computes the cardinality of the join columns from a particular factor,
when that factor is joined with another join tree.
|
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 DirectedGraph<Integer,DefaultEdge> |
ProjectToWindowRule.WindowedAggRelSplitter.createGraphFromExpression(List<RexNode> exprs) |
private LoptJoinTree |
LoptOptimizeJoinRule.createJoinSubtree(RelMetadataQuery mq,
RelBuilder relBuilder,
LoptMultiJoin multiJoin,
LoptJoinTree left,
LoptJoinTree right,
RexNode condition,
JoinRelType joinType,
List<RexNode> filtersToAdd,
boolean fullAdjust,
boolean selfJoin)
Creates a LogicalJoin given left and right operands and a join condition.
|
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
|
private LoptJoinTree |
LoptOptimizeJoinRule.createReplacementJoin(RelBuilder relBuilder,
LoptMultiJoin multiJoin,
LoptSemiJoinOptimizer semiJoinOpt,
LoptJoinTree currJoinTree,
int leftIdx,
int factorToAdd,
ImmutableIntList newKeys,
Integer[] replacementKeys,
List<RexNode> filtersToAdd)
Creates a replacement join, projecting either dummy columns or
replacement keys from the factor that doesn't actually need to be joined.
|
private LoptJoinTree |
LoptOptimizeJoinRule.createReplacementSemiJoin(RelBuilder relBuilder,
LoptMultiJoin multiJoin,
LoptSemiJoinOptimizer semiJoinOpt,
LoptJoinTree factTree,
int dimIdx,
List<RexNode> filtersToAdd)
In the event that a dimension table does not need to be joined because of
a semijoin, this method creates a join tree that consists of a projection
on top of an existing join tree.
|
private RexNode |
ReduceDecimalsRule.BinaryArithmeticExpander.expandComparison(RexCall call,
List<RexNode> operands) |
private RexNode |
ReduceDecimalsRule.BinaryArithmeticExpander.expandDivide(RexCall call,
List<RexNode> operands) |
private RexNode |
ReduceDecimalsRule.BinaryArithmeticExpander.expandMod(RexCall call,
List<RexNode> operands) |
private RexNode |
ReduceDecimalsRule.BinaryArithmeticExpander.expandPlusMinus(RexCall call,
List<RexNode> operands) |
private RexNode |
ReduceDecimalsRule.BinaryArithmeticExpander.expandTimes(RexCall call,
List<RexNode> operands) |
private int |
PushProjector.RefAndExprConverter.findExprInList(RexNode rex,
List<RexNode> rexList) |
private int |
PushProjector.RefAndExprConverter.findExprInLists(RexNode rex,
List<RexNode> rexList1,
int adjust1,
List<RexNode> rexList2,
int adjust2)
Looks for a matching RexNode from among two lists of RexNodes and
returns the offset into the list corresponding to the match, adjusted
by an amount, depending on whether the match was from the first or
second list.
|
private int |
PushProjector.RefAndExprConverter.findExprInLists(RexNode rex,
List<RexNode> rexList1,
int adjust1,
List<RexNode> rexList2,
int adjust2)
Looks for a matching RexNode from among two lists of RexNodes and
returns the offset into the list corresponding to the match, adjusted
by an amount, depending on whether the match was from the first or
second list.
|
protected static void |
ReduceExpressionsRule.findReducibleExps(RelDataTypeFactory typeFactory,
List<RexNode> exps,
com.google.common.collect.ImmutableMap<RexNode,RexNode> constants,
List<RexNode> constExps,
List<Boolean> addCasts,
List<RexNode> removableCasts)
Locates expressions that can be reduced to literals or converted to
expressions with redundant casts removed.
|
protected static void |
ReduceExpressionsRule.findReducibleExps(RelDataTypeFactory typeFactory,
List<RexNode> exps,
com.google.common.collect.ImmutableMap<RexNode,RexNode> constants,
List<RexNode> constExps,
List<Boolean> addCasts,
List<RexNode> removableCasts)
Locates expressions that can be reduced to literals or converted to
expressions with redundant casts removed.
|
protected static void |
ReduceExpressionsRule.findReducibleExps(RelDataTypeFactory typeFactory,
List<RexNode> exps,
com.google.common.collect.ImmutableMap<RexNode,RexNode> constants,
List<RexNode> constExps,
List<Boolean> addCasts,
List<RexNode> removableCasts)
Locates expressions that can be reduced to literals or converted to
expressions with redundant casts removed.
|
protected static void |
ReduceExpressionsRule.findReducibleExps(RelDataTypeFactory typeFactory,
List<RexNode> exps,
com.google.common.collect.ImmutableMap<RexNode,RexNode> constants,
List<RexNode> constExps,
List<Boolean> addCasts,
List<RexNode> removableCasts)
Locates expressions that can be reduced to literals or converted to
expressions with redundant casts removed.
|
protected static void |
ReduceExpressionsRule.findReducibleExps(RelDataTypeFactory typeFactory,
List<RexNode> exps,
com.google.common.collect.ImmutableMap<RexNode,RexNode> constants,
List<RexNode> constExps,
List<Boolean> addCasts,
List<RexNode> removableCasts)
Locates expressions that can be reduced to literals or converted to
expressions with redundant casts removed.
|
private SemiJoin |
LoptSemiJoinOptimizer.findSemiJoinIndexByCost(LoptMultiJoin multiJoin,
List<RexNode> joinFilters,
int factIdx,
int dimIdx)
Given a list of possible filters on a fact table, determine if there is
an index that can be used, provided all the fact table keys originate
from the same underlying table.
|
protected com.google.common.collect.Multimap<Integer,Integer> |
AbstractMaterializedViewRule.MaterializedViewAggregateRule.generateMapping(RexBuilder rexBuilder,
RexSimplify simplify,
RelMetadataQuery mq,
RelNode node,
RelNode target,
ImmutableBitSet positions,
com.google.common.collect.BiMap<RexTableInputRef.RelTableRef,RexTableInputRef.RelTableRef> tableMapping,
AbstractMaterializedViewRule.EquivalenceClasses sourceEC,
List<RexNode> additionalExprs)
Mapping from node expressions to target expressions.
|
private static AbstractMaterializedViewRule.NodeLineage |
AbstractMaterializedViewRule.generateSwapColumnTableReferencesLineage(RexBuilder rexBuilder,
RelMetadataQuery mq,
RelNode node,
com.google.common.collect.BiMap<RexTableInputRef.RelTableRef,RexTableInputRef.RelTableRef> tableMapping,
AbstractMaterializedViewRule.EquivalenceClasses ec,
List<RexNode> nodeExprs)
It swaps the column references and then the table references of the input
expressions using the equivalence classes and the table mapping.
|
private static AbstractMaterializedViewRule.NodeLineage |
AbstractMaterializedViewRule.generateSwapTableColumnReferencesLineage(RexBuilder rexBuilder,
RelMetadataQuery mq,
RelNode node,
com.google.common.collect.BiMap<RexTableInputRef.RelTableRef,RexTableInputRef.RelTableRef> tableMapping,
AbstractMaterializedViewRule.EquivalenceClasses ec,
List<RexNode> nodeExprs)
It swaps the table references and then the column references of the input
expressions using the table mapping and the equivalence classes.
|
private int |
LoptOptimizeJoinRule.getBestNextFactor(RelMetadataQuery mq,
LoptMultiJoin multiJoin,
BitSet factorsToAdd,
BitSet factorsAdded,
LoptSemiJoinOptimizer semiJoinOpt,
LoptJoinTree joinTree,
List<RexNode> filtersToAdd)
Determines the best factor to be added next into a join tree.
|
static boolean |
ProjectRemoveRule.isIdentity(List<? extends RexNode> exps,
RelDataType childRowType)
Deprecated.
|
private boolean |
LoptOptimizeJoinRule.isSelfJoinFilterUnique(RelMetadataQuery mq,
LoptMultiJoin multiJoin,
int leftFactor,
int rightFactor,
List<RexNode> joinFilterList)
Determines if the equality join filters between two factors that map to
the same table consist of unique, identical keys.
|
private static ImmutableBitSet |
AggregateJoinTransposeRule.keyColumns(ImmutableBitSet aggregateColumns,
com.google.common.collect.ImmutableList<RexNode> predicates)
Computes the closure of a set of columns according to a given list of
constraints.
|
private LoptJoinTree |
LoptOptimizeJoinRule.pushDownFactor(RelMetadataQuery mq,
RelBuilder relBuilder,
LoptMultiJoin multiJoin,
LoptSemiJoinOptimizer semiJoinOpt,
LoptJoinTree joinTree,
int factorToAdd,
BitSet factorsNeeded,
List<RexNode> filtersToAdd,
boolean selfJoin)
Creates a join tree where the new factor is pushed down one of the
operands of the current join tree
|
private RexNode |
AggregateReduceFunctionsRule.reduceAgg(Aggregate oldAggRel,
AggregateCall oldCall,
List<AggregateCall> newCalls,
Map<AggregateCall,RexNode> aggCallMapping,
List<RexNode> inputExprs) |
private RexNode |
AggregateReduceFunctionsRule.reduceAgg(Aggregate oldAggRel,
AggregateCall oldCall,
List<AggregateCall> newCalls,
Map<AggregateCall,RexNode> aggCallMapping,
List<RexNode> inputExprs) |
private RexNode |
AggregateReduceFunctionsRule.reduceAvg(Aggregate oldAggRel,
AggregateCall oldCall,
List<AggregateCall> newCalls,
Map<AggregateCall,RexNode> aggCallMapping,
List<RexNode> inputExprs) |
private RexNode |
AggregateReduceFunctionsRule.reduceAvg(Aggregate oldAggRel,
AggregateCall oldCall,
List<AggregateCall> newCalls,
Map<AggregateCall,RexNode> aggCallMapping,
List<RexNode> inputExprs) |
protected static boolean |
ReduceExpressionsRule.reduceExpressions(RelNode rel,
List<RexNode> expList,
RelOptPredicateList predicates)
Reduces a list of expressions.
|
protected static boolean |
ReduceExpressionsRule.reduceExpressions(RelNode rel,
List<RexNode> expList,
RelOptPredicateList predicates,
boolean unknownAsFalse)
Deprecated.
|
protected static boolean |
ReduceExpressionsRule.reduceExpressions(RelNode rel,
List<RexNode> expList,
RelOptPredicateList predicates,
boolean unknownAsFalse,
boolean matchNullability)
Reduces a list of expressions.
|
protected static boolean |
ReduceExpressionsRule.reduceExpressionsInternal(RelNode rel,
RexSimplify simplify,
List<RexNode> expList,
RelOptPredicateList predicates) |
private RexNode |
AggregateReduceFunctionsRule.reduceStddev(Aggregate oldAggRel,
AggregateCall oldCall,
boolean biased,
boolean sqrt,
List<AggregateCall> newCalls,
Map<AggregateCall,RexNode> aggCallMapping,
List<RexNode> inputExprs) |
private RexNode |
AggregateReduceFunctionsRule.reduceStddev(Aggregate oldAggRel,
AggregateCall oldCall,
boolean biased,
boolean sqrt,
List<AggregateCall> newCalls,
Map<AggregateCall,RexNode> aggCallMapping,
List<RexNode> inputExprs) |
private RexNode |
AggregateReduceFunctionsRule.reduceSum(Aggregate oldAggRel,
AggregateCall oldCall,
List<AggregateCall> newCalls,
Map<AggregateCall,RexNode> aggCallMapping) |
private static RexNode |
AbstractMaterializedViewRule.rewriteExpression(RexBuilder rexBuilder,
RelMetadataQuery mq,
RelNode targetNode,
RelNode node,
List<RexNode> nodeExprs,
com.google.common.collect.BiMap<RexTableInputRef.RelTableRef,RexTableInputRef.RelTableRef> tableMapping,
AbstractMaterializedViewRule.EquivalenceClasses ec,
boolean swapTableColumn,
RexNode exprToRewrite)
First, the method takes the node expressions
nodeExprs and swaps the table
and column references using the table mapping and the equivalence classes. |
private static List<RexNode> |
AbstractMaterializedViewRule.rewriteExpressions(RexBuilder rexBuilder,
RelMetadataQuery mq,
RelNode targetNode,
RelNode node,
List<RexNode> nodeExprs,
com.google.common.collect.BiMap<RexTableInputRef.RelTableRef,RexTableInputRef.RelTableRef> tableMapping,
AbstractMaterializedViewRule.EquivalenceClasses ec,
boolean swapTableColumn,
List<RexNode> exprsToRewrite)
First, the method takes the node expressions
nodeExprs and swaps the table
and column references using the table mapping and the equivalence classes. |
private static List<RexNode> |
AbstractMaterializedViewRule.rewriteExpressions(RexBuilder rexBuilder,
RelMetadataQuery mq,
RelNode targetNode,
RelNode node,
List<RexNode> nodeExprs,
com.google.common.collect.BiMap<RexTableInputRef.RelTableRef,RexTableInputRef.RelTableRef> tableMapping,
AbstractMaterializedViewRule.EquivalenceClasses ec,
boolean swapTableColumn,
List<RexNode> exprsToRewrite)
First, the method takes the node expressions
nodeExprs and swaps the table
and column references using the table mapping and the equivalence classes. |
private void |
LoptOptimizeJoinRule.setFactorJoinKeys(LoptMultiJoin multiJoin,
List<RexNode> filters,
ImmutableBitSet joinFactors,
int factorStart,
int nFields,
ImmutableBitSet.Builder joinKeys)
Locates from a list of filters those that correspond to a particular join
tree.
|
(package private) static void |
JoinPushThroughJoinRule.split(RexNode condition,
ImmutableBitSet bitSet,
List<RexNode> intersecting,
List<RexNode> nonIntersecting)
Splits a condition into conjunctions that do or do not intersect with
a given bit set.
|
(package private) static void |
JoinPushThroughJoinRule.split(RexNode condition,
ImmutableBitSet bitSet,
List<RexNode> intersecting,
List<RexNode> nonIntersecting)
Splits a condition into conjunctions that do or do not intersect with
a given bit set.
|
protected void |
FilterJoinRule.validateJoinFilters(List<RexNode> aboveFilters,
List<RexNode> joinFilters,
Join join,
JoinRelType joinType)
Validates that target execution framework can satisfy join filters.
|
protected void |
FilterJoinRule.validateJoinFilters(List<RexNode> aboveFilters,
List<RexNode> joinFilters,
Join join,
JoinRelType joinType)
Validates that target execution framework can satisfy join filters.
|
protected List<RexNode> |
DateRangeRules.ExtractShuttle.visitList(List<? extends RexNode> exprs,
boolean[] update) |
| Constructor and Description |
|---|
Edge(RexNode condition,
ImmutableBitSet factors,
ImmutableBitSet columns) |
EquiJoin(RelOptCluster cluster,
RelTraitSet traits,
RelNode left,
RelNode right,
RexNode condition,
ImmutableIntList leftKeys,
ImmutableIntList rightKeys,
JoinRelType joinType,
Set<String> variablesStopped)
Deprecated.
|
HighestUsageFinder(RexNode[] exprs,
int[] exprLevels) |
InputToCommonExprConverter(int[] exprInverseOrdinals,
int[] exprLevels,
int level,
int[] inputExprOrdinals,
RexNode[] allExprs) |
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.
|
PushProjector(Project origProj,
RexNode origFilter,
RelNode childRel,
PushProjector.ExprCondition preserveExprCondition,
RelBuilder relBuilder)
Creates a PushProjector object for pushing projects past a RelNode.
|
ReplaceSubQueryShuttle(RexSubQuery subQuery,
RexNode replacement) |
| Constructor and Description |
|---|
InputSpecialOpFinder(BitSet rexRefs,
ImmutableBitSet leftFields,
ImmutableBitSet rightFields,
ImmutableBitSet strongFields,
PushProjector.ExprCondition preserveExprCondition,
List<RexNode> preserveLeft,
List<RexNode> preserveRight) |
InputSpecialOpFinder(BitSet rexRefs,
ImmutableBitSet leftFields,
ImmutableBitSet rightFields,
ImmutableBitSet strongFields,
PushProjector.ExprCondition preserveExprCondition,
List<RexNode> preserveLeft,
List<RexNode> preserveRight) |
JoinVertex(int id,
int leftFactor,
int rightFactor,
ImmutableBitSet factors,
double cost,
com.google.common.collect.ImmutableList<RexNode> conditions) |
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.
|
ReducibleExprLocator(RelDataTypeFactory typeFactory,
com.google.common.collect.ImmutableMap<RexNode,RexNode> constants,
List<RexNode> constExprs,
List<Boolean> addCasts,
List<RexNode> removableCasts) |
ReducibleExprLocator(RelDataTypeFactory typeFactory,
com.google.common.collect.ImmutableMap<RexNode,RexNode> constants,
List<RexNode> constExprs,
List<Boolean> addCasts,
List<RexNode> removableCasts) |
ReducibleExprLocator(RelDataTypeFactory typeFactory,
com.google.common.collect.ImmutableMap<RexNode,RexNode> constants,
List<RexNode> constExprs,
List<Boolean> addCasts,
List<RexNode> removableCasts) |
ReducibleExprLocator(RelDataTypeFactory typeFactory,
com.google.common.collect.ImmutableMap<RexNode,RexNode> constants,
List<RexNode> constExprs,
List<Boolean> addCasts,
List<RexNode> removableCasts) |
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) |
RexReplacer(RexSimplify simplify,
List<RexNode> reducibleExps,
List<RexNode> reducedValues,
List<Boolean> addCasts) |
RexReplacer(RexSimplify simplify,
List<RexNode> reducibleExps,
List<RexNode> reducedValues,
List<Boolean> addCasts) |
| Modifier and Type | Class and Description |
|---|---|
class |
RexCall
An expression formed by a call to an operator with zero or more expressions
as operands.
|
class |
RexCorrelVariable
Reference to the current row of a correlating relational expression.
|
class |
RexDynamicParam
Dynamic parameter reference in a row-expression.
|
class |
RexFieldAccess
Access to a field of a row-expression.
|
class |
RexInputRef
Variable which references a field of an input relational expression.
|
class |
RexLiteral
Constant value in a row-expression.
|
class |
RexLocalRef
Local variable.
|
class |
RexOver
Call to an aggregate function over a window.
|
class |
RexPatternFieldRef
Variable which references a field of an input relational expression
|
class |
RexRangeRef
Reference to a range of columns.
|
class |
RexSlot
Abstract base class for
RexInputRef and RexLocalRef. |
class |
RexSubQuery
Scalar expression that represents an IN, EXISTS or scalar sub-query.
|
class |
RexTableInputRef
Variable which references a column of a table occurrence in a relational plan.
|
class |
RexVariable
A row-expression which references a field.
|
| Modifier and Type | Field and Description |
|---|---|
private RexNode |
RexFieldAccess.expr |
private RexNode |
RexWindowBound.RexWindowBoundBounded.offset |
(package private) RexNode |
RexSimplify.Comparison.ref |
private RexNode |
RexTransformer.root |
private RexNode |
LogicVisitor.seek |
| Modifier and Type | Field and Description |
|---|---|
private static com.google.common.base.Function<? super RexNode,? extends RexNode> |
RexUtil.ADD_NOT |
private static com.google.common.base.Function<? super RexNode,? extends RexNode> |
RexUtil.ADD_NOT |
private List<RexNode> |
RexProgramBuilder.exprList |
private List<RexNode> |
RexProgram.exprs
First stage of expression evaluation.
|
private List<RexNode> |
RexProgram.ExpansionShuttle.exprs |
private static Predicate1<RexNode> |
RexUtil.IS_FLAT_PREDICATE |
private List<RexNode> |
RexProgramBuilder.RegisterMidputShuttle.localExprList |
private List<RexNode> |
RexProgramBuilder.RegisterOutputShuttle.localExprList |
(package private) Map<String,RexNode> |
RexUtil.ExpressionNormalizer.mapDigestToExpr |
private List<RexNode> |
RexCallBinding.operands |
com.google.common.collect.ImmutableList<RexNode> |
RexCall.operands |
com.google.common.collect.ImmutableList<RexNode> |
RexWindow.partitionKeys |
private static com.google.common.base.Function<RexNode,RelDataType> |
RexUtil.TYPE_FN |
private Map<RexNode,Boolean> |
RexUtil.ExprSimplifier.unknownAsFalseMap |
| Modifier and Type | Method and Description |
|---|---|
<T extends RexNode> |
RexShuttle.apply(List<T> exprList)
Applies this shuttle to each expression in a list and returns the
resulting list.
|
static <T extends RexNode> |
RexUtil.apply(RexVisitor<T> shuttle,
T[] exprs)
Applies a shuttle to an array of expressions.
|
private static <C extends RexNode> |
RexUtil.gatherConstraint(Class<C> clazz,
RexNode left,
RexNode right,
Map<RexNode,C> map,
Set<RexNode> excludeSet,
RexBuilder rexBuilder) |
private static <C extends RexNode> |
RexUtil.gatherConstraints(Class<C> clazz,
RexNode predicate,
Map<RexNode,C> map,
Set<RexNode> excludeSet,
RexBuilder rexBuilder) |
<T extends RexNode> |
RexShuttle.mutate(List<T> exprList)
Applies this shuttle to each expression in a list.
|
static <C extends RexNode> |
RexUtil.predicateConstants(Class<C> clazz,
RexBuilder rexBuilder,
List<RexNode> predicates)
Creates a map containing each (e, constant) pair that occurs within
a predicate list.
|
| 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.
|
private RexNode |
RexUtil.CnfHelper.and(Iterable<? extends RexNode> nodes) |
private RexNode |
RexUtil.DnfHelper.and(Iterable<? extends RexNode> nodes) |
static RexNode |
RexUtil.andNot(RexBuilder rexBuilder,
RexNode e,
Iterable<? extends RexNode> notTerms)
Creates the expression
e1 AND NOT notTerm1 AND NOT notTerm2 .... |
static RexNode |
RexUtil.andNot(RexBuilder rexBuilder,
RexNode e,
RexNode... notTerms)
Creates the expression
e1 AND NOT notTerm1 AND NOT notTerm2 .... |
static RexNode |
RexUtil.apply(Mappings.TargetMapping mapping,
RexNode node)
Applies a mapping to an expression.
|
RexNode |
RexShuttle.apply(RexNode expr)
Applies this shuttle to an expression, or returns null if the expression
is null.
|
static <T extends RexNode> |
RexUtil.apply(RexVisitor<T> shuttle,
T[] exprs)
Applies a shuttle to an array of expressions.
|
static RexNode |
RexUtil.composeConjunction(RexBuilder rexBuilder,
Iterable<? extends RexNode> nodes,
boolean nullOnEmpty)
Converts a collection of expressions into an AND.
|
static RexNode |
RexUtil.composeDisjunction(RexBuilder rexBuilder,
Iterable<? extends RexNode> nodes)
Converts a collection of expressions into an OR.
|
static RexNode |
RexUtil.composeDisjunction(RexBuilder rexBuilder,
Iterable<? extends RexNode> nodes,
boolean nullOnEmpty)
Converts a collection of expressions into an OR,
optionally returning null if the list is empty.
|
RexNode |
RexBuilder.copy(RexNode expr)
Creates a copy of an expression, which may have been created using a
different RexBuilder and/or
RelDataTypeFactory, using this
RexBuilder. |
RexNode |
RexBuilder.decodeIntervalOrDecimal(RexNode node)
Retrieves an interval or decimal node's integer representation
|
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.
|
RexNode |
RexProgram.expandLocalRef(RexLocalRef ref)
Fully expands a RexLocalRef back into a pure RexNode tree containing no
RexLocalRefs (reversing the effect of common subexpression elimination).
|
static RexNode |
RexUtil.flatten(RexBuilder rexBuilder,
RexNode node)
Flattens an expression.
|
RexNode |
RexProgram.gatherExpr(RexNode expr) |
RexNode |
RexWindowBound.getOffset()
Returns offset from XX PRECEDING/FOLLOWING.
|
RexNode |
RexWindowBound.RexWindowBoundBounded.getOffset() |
RexNode |
RexFieldAccess.getReferenceExpr()
Returns the expression whose field is being accessed.
|
static RexNode |
RexUtil.invert(RexBuilder rexBuilder,
RexCall call) |
protected RexNode |
RexUtil.ExpressionNormalizer.lookup(RexNode expr) |
RexNode |
RexBuilder.makeAbstractCast(RelDataType type,
RexNode exp)
Creates a call to the CAST operator.
|
RexNode |
RexBuilder.makeCall(RelDataType returnType,
SqlOperator op,
List<RexNode> exprs)
Creates a call with a list of arguments and a predetermined type.
|
RexNode |
RexBuilder.makeCall(SqlOperator op,
List<? extends RexNode> exprs)
Creates a call with an array of arguments.
|
RexNode |
RexBuilder.makeCall(SqlOperator op,
RexNode... exprs)
Creates a call with a list of arguments.
|
RexNode |
RexBuilder.makeCast(RelDataType type,
RexNode exp)
Creates a call to the CAST operator.
|
RexNode |
RexBuilder.makeCast(RelDataType type,
RexNode exp,
boolean matchNullability)
Creates a call to the CAST operator, expanding if possible, and optionally
also preserving nullability.
|
private RexNode |
RexBuilder.makeCastBooleanToExact(RelDataType toType,
RexNode exp) |
private RexNode |
RexBuilder.makeCastExactToBoolean(RelDataType toType,
RexNode exp) |
private RexNode |
RexBuilder.makeCastIntervalToExact(RelDataType toType,
RexNode exp) |
RexNode |
RexBuilder.makeCorrel(RelDataType type,
CorrelationId id)
Creates an expression referencing a correlation variable.
|
RexNode |
RexBuilder.makeFieldAccess(RexNode expr,
int i)
Creates an expression accessing a field with a given ordinal from a
record.
|
RexNode |
RexBuilder.makeFieldAccess(RexNode expr,
String fieldName,
boolean caseSensitive)
Creates an expression accessing a given named field from a record.
|
private RexNode |
RexBuilder.makeFieldAccessInternal(RexNode expr,
RelDataTypeField field)
Creates an expression accessing a given field from a record.
|
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.makeNotNull(RexNode exp)
Makes a cast of a value to NOT NULL;
no-op if the type already has NOT NULL.
|
RexNode |
RexBuilder.makeNullLiteral(SqlTypeName typeName)
Deprecated.
|
RexNode |
RexBuilder.makeNullLiteral(SqlTypeName typeName,
int precision)
Deprecated.
|
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,
boolean distinct)
Creates a call to a windowed agg.
|
RexNode |
RexBuilder.makeRangeReference(RelNode input)
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.
|
RexNode |
RexBuilder.multiplyDivide(RexNode e,
BigDecimal multiplier,
BigDecimal divider) |
static RexNode |
RexUtil.negate(RexBuilder rexBuilder,
RexCall call) |
static RexNode |
RexUtil.not(RexNode e)
Negates a logical expression by adding or removing a NOT.
|
private RexNode |
RexUtil.CnfHelper.or(Iterable<? extends RexNode> nodes) |
private RexNode |
RexUtil.DnfHelper.or(Iterable<? extends RexNode> nodes) |
private static <C extends Comparable<C>> |
RexSimplify.processRange(RexBuilder rexBuilder,
List<RexNode> terms,
Map<String,Pair<com.google.common.collect.Range<C>,List<RexNode>>> rangeTerms,
RexNode term,
RexNode ref,
C v0,
SqlKind comparison) |
private RexNode |
RexUtil.CnfHelper.pull(RexNode rex) |
static RexNode |
RexUtil.pullFactors(RexBuilder rexBuilder,
RexNode node)
Creates an equivalent version of a node where common factors among ORs
are pulled up.
|
protected RexNode |
RexUtil.ExpressionNormalizer.register(RexNode expr) |
private RexNode |
RexUtil.CnfHelper.removeFactor(Map<String,RexNode> factors,
RexNode node) |
static RexNode |
RexUtil.removeNullabilityCast(RelDataTypeFactory typeFactory,
RexNode node)
Removes any casts that change nullability but not type.
|
RexNode |
RexSimplify.removeNullabilityCast(RexNode e)
Removes any casts that change nullability but not type.
|
static RexNode |
RexUtil.shift(RexNode node,
int offset)
Shifts every
RexInputRef in an expression by offset. |
static RexNode |
RexUtil.shift(RexNode node,
int start,
int offset)
|
static RexNode |
RexUtil.simplify(RexBuilder rexBuilder,
RexNode e)
Deprecated.
Use
RexSimplify.simplify(RexNode),
which allows you to specify an RexExecutor. |
static RexNode |
RexUtil.simplify(RexBuilder rexBuilder,
RexNode e,
boolean unknownAsFalse)
Deprecated.
Use
RexSimplify.simplify(RexNode),
which allows you to specify an RexExecutor. |
RexNode |
RexSimplify.simplify(RexNode e)
Simplifies a boolean expression.
|
static RexNode |
RexUtil.simplifyAnd(RexBuilder rexBuilder,
RexCall e,
boolean unknownAsFalse)
Deprecated.
|
RexNode |
RexSimplify.simplifyAnd(RexCall e) |
(package private) RexNode |
RexSimplify.simplifyAnd2(List<RexNode> terms,
List<RexNode> notTerms) |
static RexNode |
RexUtil.simplifyAnd2(RexBuilder rexBuilder,
List<RexNode> terms,
List<RexNode> notTerms)
Deprecated.
|
(package private) RexNode |
RexSimplify.simplifyAnd2ForUnknownAsFalse(List<RexNode> terms,
List<RexNode> notTerms)
As
RexSimplify.simplifyAnd2(List, List) but we assume that if the expression
returns UNKNOWN it will be interpreted as FALSE. |
private <C extends Comparable<C>> |
RexSimplify.simplifyAnd2ForUnknownAsFalse(List<RexNode> terms,
List<RexNode> notTerms,
Class<C> clazz) |
static RexNode |
RexUtil.simplifyAnd2ForUnknownAsFalse(RexBuilder rexBuilder,
List<RexNode> terms,
List<RexNode> notTerms)
Deprecated.
|
RexNode |
RexSimplify.simplifyAnds(Iterable<? extends RexNode> nodes)
Simplifies a conjunction of boolean expressions.
|
static RexNode |
RexUtil.simplifyAnds(RexBuilder rexBuilder,
Iterable<? extends RexNode> nodes)
Deprecated.
Use
RexSimplify.simplifyAnds(Iterable),
which allows you to specify an RexExecutor. |
static RexNode |
RexUtil.simplifyAnds(RexBuilder rexBuilder,
Iterable<? extends RexNode> nodes,
boolean unknownAsFalse)
Deprecated.
|
private RexNode |
RexSimplify.simplifyCase(RexCall call) |
private RexNode |
RexSimplify.simplifyCast(RexCall e) |
private RexNode |
RexSimplify.simplifyCeilFloor(RexCall e)
Tries to simplify CEIL/FLOOR function on top of CEIL/FLOOR.
|
private RexNode |
RexSimplify.simplifyComparison(RexCall e) |
private <C extends Comparable<C>> |
RexSimplify.simplifyComparison(RexCall e,
Class<C> clazz) |
private RexNode |
RexSimplify.simplifyIs(RexCall call) |
private RexNode |
RexSimplify.simplifyIs2(SqlKind kind,
RexNode a) |
private RexNode |
RexSimplify.simplifyIsNotNull(RexNode a) |
private RexNode |
RexSimplify.simplifyNot(RexCall call) |
static RexNode |
RexUtil.simplifyOr(RexBuilder rexBuilder,
RexCall call)
Deprecated.
|
RexNode |
RexSimplify.simplifyOr(RexCall call)
Simplifies OR(x, x) into x, and similar.
|
RexNode |
RexSimplify.simplifyOrs(List<RexNode> terms)
Simplifies a list of terms and combines them into an OR.
|
static RexNode |
RexUtil.simplifyOrs(RexBuilder rexBuilder,
List<RexNode> terms)
Deprecated.
|
static RexNode |
RexUtil.simplifyPreservingType(RexBuilder rexBuilder,
RexNode e)
Deprecated.
Use
RexSimplify.simplifyPreservingType(RexNode),
which allows you to specify an RexExecutor. |
RexNode |
RexSimplify.simplifyPreservingType(RexNode e)
Simplifies a boolean expression, always preserving its type and its
nullability.
|
private <C extends Comparable<C>> |
RexSimplify.simplifyUsingPredicates(RexNode e,
Class<C> clazz) |
static RexNode |
RexUtil.swapColumnReferences(RexBuilder rexBuilder,
RexNode node,
Map<RexTableInputRef,Set<RexTableInputRef>> ec)
Given an expression, it will swap its column references
RexTableInputRef
using the contents in the map (in particular, the first element of the set in the
map value). |
static RexNode |
RexUtil.swapColumnTableReferences(RexBuilder rexBuilder,
RexNode node,
Map<RexTableInputRef,Set<RexTableInputRef>> ec,
Map<RexTableInputRef.RelTableRef,RexTableInputRef.RelTableRef> tableMapping)
Given an expression, it will swap the column references
RexTableInputRef
using the contents in the first map (in particular, the first element of the set
in the map value), and then it will swap the table references contained in its
RexTableInputRef using the contents in the second map. |
static RexNode |
RexUtil.swapTableColumnReferences(RexBuilder rexBuilder,
RexNode node,
Map<RexTableInputRef.RelTableRef,RexTableInputRef.RelTableRef> tableMapping,
Map<RexTableInputRef,Set<RexTableInputRef>> ec)
Given an expression, it will swap the table references contained in its
RexTableInputRef using the contents in the first map, and then
it will swap the column references RexTableInputRef using the contents
in the second map (in particular, the first element of the set in the map value). |
static RexNode |
RexUtil.swapTableReferences(RexBuilder rexBuilder,
RexNode node,
Map<RexTableInputRef.RelTableRef,RexTableInputRef.RelTableRef> tableMapping)
Given an expression, it will swap the table references contained in its
RexTableInputRef using the contents in the map. |
static RexNode |
RexUtil.toCnf(RexBuilder rexBuilder,
int maxCnfNodeCount,
RexNode rex)
Similar to
RexUtil.toCnf(RexBuilder, RexNode); however, it lets you
specify a threshold in the number of nodes that can be created out of
the conversion. |
static RexNode |
RexUtil.toCnf(RexBuilder rexBuilder,
RexNode rex)
Converts an expression to conjunctive normal form (CNF).
|
RexNode |
RexUtil.CnfHelper.toCnf(RexNode rex) |
private RexNode |
RexUtil.CnfHelper.toCnf2(RexNode rex) |
static RexNode |
RexUtil.toDnf(RexBuilder rexBuilder,
RexNode rex)
Converts an expression to disjunctive normal form (DNF).
|
RexNode |
RexUtil.DnfHelper.toDnf(RexNode rex) |
RexNode |
RexTransformer.transformNullSemantics() |
private RexNode |
RexTransformer.transformNullSemantics(RexNode node) |
protected RexNode[] |
RexShuttle.visitArray(RexNode[] exprs,
boolean[] update)
Visits each of an array of expressions and returns an array of the
results.
|
RexNode |
RexPermuteInputsShuttle.visitCall(RexCall call) |
RexNode |
RexCopier.visitCall(RexCall call) |
RexNode |
RexUtil.ExpressionNormalizer.visitCall(RexCall call) |
RexNode |
RexUtil.ExprSimplifier.visitCall(RexCall call) |
RexNode |
RexShuttle.visitCall(RexCall call) |
RexNode |
RexProgramBuilder.RegisterShuttle.visitCall(RexCall call) |
RexNode |
RexProgram.Marshaller.visitCall(RexCall call) |
RexNode |
RexCopier.visitCorrelVariable(RexCorrelVariable variable) |
RexNode |
RexUtil.ExpressionNormalizer.visitCorrelVariable(RexCorrelVariable correlVariable) |
RexNode |
RexShuttle.visitCorrelVariable(RexCorrelVariable variable) |
RexNode |
RexProgramBuilder.RegisterShuttle.visitCorrelVariable(RexCorrelVariable variable) |
RexNode |
RexProgram.Marshaller.visitCorrelVariable(RexCorrelVariable correlVariable) |
RexNode |
RexCopier.visitDynamicParam(RexDynamicParam dynamicParam) |
RexNode |
RexUtil.ExpressionNormalizer.visitDynamicParam(RexDynamicParam dynamicParam) |
RexNode |
RexShuttle.visitDynamicParam(RexDynamicParam dynamicParam) |
RexNode |
RexProgramBuilder.RegisterShuttle.visitDynamicParam(RexDynamicParam dynamicParam) |
RexNode |
RexProgram.Marshaller.visitDynamicParam(RexDynamicParam dynamicParam) |
RexNode |
RexCopier.visitFieldAccess(RexFieldAccess fieldAccess) |
RexNode |
RexUtil.ExpressionNormalizer.visitFieldAccess(RexFieldAccess fieldAccess) |
RexNode |
RexShuttle.visitFieldAccess(RexFieldAccess fieldAccess) |
RexNode |
RexProgramBuilder.RegisterShuttle.visitFieldAccess(RexFieldAccess fieldAccess) |
RexNode |
RexProgram.Marshaller.visitFieldAccess(RexFieldAccess fieldAccess) |
RexNode |
RexPermuteInputsShuttle.visitInputRef(RexInputRef local) |
RexNode |
RexCopier.visitInputRef(RexInputRef inputRef) |
RexNode |
RexUtil.ExpressionNormalizer.visitInputRef(RexInputRef inputRef) |
RexNode |
RexUtil.RexShiftShuttle.visitInputRef(RexInputRef input) |
RexNode |
RexUtil.FixNullabilityShuttle.visitInputRef(RexInputRef ref) |
RexNode |
RexShuttle.visitInputRef(RexInputRef inputRef) |
RexNode |
RexProgramBuilder.RegisterInputShuttle.visitInputRef(RexInputRef input) |
RexNode |
RexProgramBuilder.RegisterOutputShuttle.visitInputRef(RexInputRef input) |
RexNode |
RexProgram.Marshaller.visitInputRef(RexInputRef inputRef) |
RexNode |
RexCopier.visitLiteral(RexLiteral literal) |
RexNode |
RexUtil.ExpressionNormalizer.visitLiteral(RexLiteral literal) |
RexNode |
RexShuttle.visitLiteral(RexLiteral literal) |
RexNode |
RexProgramBuilder.RegisterShuttle.visitLiteral(RexLiteral literal) |
RexNode |
RexProgram.Marshaller.visitLiteral(RexLiteral literal) |
RexNode |
RexCopier.visitLocalRef(RexLocalRef localRef) |
RexNode |
RexPermutationShuttle.visitLocalRef(RexLocalRef local) |
RexNode |
RexShuttle.visitLocalRef(RexLocalRef localRef) |
RexNode |
RexProgramBuilder.RegisterInputShuttle.visitLocalRef(RexLocalRef local) |
RexNode |
RexProgramBuilder.RegisterMidputShuttle.visitLocalRef(RexLocalRef local) |
RexNode |
RexProgramBuilder.RegisterOutputShuttle.visitLocalRef(RexLocalRef local) |
RexNode |
RexProgramBuilder.UpdateRefShuttle.visitLocalRef(RexLocalRef localRef) |
RexNode |
RexProgram.ExpansionShuttle.visitLocalRef(RexLocalRef localRef) |
RexNode |
RexProgram.Marshaller.visitLocalRef(RexLocalRef localRef) |
RexNode |
RexCopier.visitOver(RexOver over) |
RexNode |
RexShuttle.visitOver(RexOver over) |
RexNode |
RexProgramBuilder.RegisterShuttle.visitOver(RexOver over) |
RexNode |
RexProgram.Marshaller.visitOver(RexOver over) |
RexNode |
RexShuttle.visitPatternFieldRef(RexPatternFieldRef fieldRef) |
RexNode |
RexCopier.visitRangeRef(RexRangeRef rangeRef) |
RexNode |
RexUtil.ExpressionNormalizer.visitRangeRef(RexRangeRef rangeRef) |
RexNode |
RexShuttle.visitRangeRef(RexRangeRef rangeRef) |
RexNode |
RexProgram.Marshaller.visitRangeRef(RexRangeRef rangeRef) |
RexNode |
RexShuttle.visitSubQuery(RexSubQuery subQuery) |
RexNode |
RexShuttle.visitTableInputRef(RexTableInputRef ref) |
| Modifier and Type | Method and Description |
|---|---|
Iterable<RexNode> |
RexShuttle.apply(Iterable<? extends RexNode> iterable)
Applies this shuttle to each expression in an iterable.
|
static Iterable<RexNode> |
RexUtil.apply(Mappings.TargetMapping mapping,
Iterable<? extends RexNode> nodes)
Applies a mapping to an iterable over expressions.
|
private static List<Pair<RexNode,RexNode>> |
RexSimplify.casePairs(RexBuilder rexBuilder,
List<RexNode> operands)
Given "CASE WHEN p1 THEN v1 ...
|
private static List<Pair<RexNode,RexNode>> |
RexSimplify.casePairs(RexBuilder rexBuilder,
List<RexNode> operands)
Given "CASE WHEN p1 THEN v1 ...
|
private Map<String,RexNode> |
RexUtil.CnfHelper.commonFactors(List<RexNode> nodes) |
static List<RexNode> |
RexUtil.fixUp(RexBuilder rexBuilder,
List<RexNode> nodes,
List<RelDataType> fieldTypes)
Fixes up the type of all
RexInputRefs in an
expression to match differences in nullability. |
static List<RexNode> |
RexUtil.fixUp(RexBuilder rexBuilder,
List<RexNode> nodes,
RelDataType rowType)
Deprecated.
|
static List<RexNode> |
RexUtil.flatten(List<? extends RexNode> exprs,
SqlOperator op)
Converts a list of operands into a list that is flat with respect to
the given operator.
|
static com.google.common.collect.ImmutableList<RexNode> |
RexUtil.flattenAnd(Iterable<? extends RexNode> nodes)
Flattens a list of AND nodes.
|
static com.google.common.collect.ImmutableList<RexNode> |
RexUtil.flattenOr(Iterable<? extends RexNode> nodes)
Flattens a list of OR nodes.
|
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
|
List<RexNode> |
RexProgram.getExprList()
Returns the common sub-expressions of this program.
|
List<RexNode> |
RexCall.getOperands() |
List<? extends RexNode> |
RexBuilder.identityProjects(RelDataType rowType)
Creates a list of
RexInputRef expressions,
projecting the fields of a given record type. |
static com.google.common.base.Function<RexNode,RexNode> |
RexUtil.notFn(RexBuilder rexBuilder)
Returns a function that applies NOT to its argument.
|
static com.google.common.base.Function<RexNode,RexNode> |
RexUtil.notFn(RexBuilder rexBuilder)
Returns a function that applies NOT to its argument.
|
static Pair<RexNode,String> |
RexInputRef.of2(int index,
List<RelDataTypeField> fields)
Creates a reference to a given field in a list of fields.
|
static <C extends RexNode> |
RexUtil.predicateConstants(Class<C> clazz,
RexBuilder rexBuilder,
List<RexNode> predicates)
Creates a map containing each (e, constant) pair that occurs within
a predicate list.
|
private List<RexNode> |
RexUtil.CnfHelper.pullList(List<RexNode> nodes) |
static List<RexNode> |
RexUtil.retainDeterministic(List<RexNode> list) |
static Iterable<RexNode> |
RexUtil.shift(Iterable<RexNode> nodes,
int offset)
Shifts every
RexInputRef in an expression by offset. |
Pair<com.google.common.collect.ImmutableList<RexNode>,com.google.common.collect.ImmutableList<RexNode>> |
RexProgram.split()
Splits this program into a list of project expressions and a list of
filter expressions.
|
Pair<com.google.common.collect.ImmutableList<RexNode>,com.google.common.collect.ImmutableList<RexNode>> |
RexProgram.split()
Splits this program into a list of project expressions and a list of
filter expressions.
|
private List<RexNode> |
RexUtil.DnfHelper.toDnfs(List<RexNode> nodes) |
protected List<RexNode> |
RexShuttle.visitList(List<? extends RexNode> exprs,
boolean[] update)
Visits each of a list of expressions and returns a list of the
results.
|
| Modifier and Type | Method and Description |
|---|---|
private static void |
RexUtil.addAnd(com.google.common.collect.ImmutableList.Builder<RexNode> builder,
Set<String> digests,
RexNode node) |
void |
RexProgramBuilder.addCondition(RexNode expr)
Sets the condition of the program.
|
RexLocalRef |
RexProgramBuilder.addExpr(RexNode expr)
Adds an expression to the list of common expressions, and returns a
reference to the expression.
|
private static void |
RexUtil.addOr(com.google.common.collect.ImmutableList.Builder<RexNode> builder,
Set<String> digests,
RexNode node) |
RexLocalRef |
RexProgramBuilder.addProject(int at,
RexNode expr,
String name)
Adds a project expression to the program at a given position.
|
RexLocalRef |
RexProgramBuilder.addProject(RexNode expr,
String name)
Adds a project expression to the program.
|
static RexNode |
RexUtil.andNot(RexBuilder rexBuilder,
RexNode e,
Iterable<? extends RexNode> notTerms)
Creates the expression
e1 AND NOT notTerm1 AND NOT notTerm2 .... |
static RexNode |
RexUtil.andNot(RexBuilder rexBuilder,
RexNode e,
RexNode... notTerms)
Creates the expression
e1 AND NOT notTerm1 AND NOT notTerm2 .... |
static RexNode |
RexUtil.andNot(RexBuilder rexBuilder,
RexNode e,
RexNode... notTerms)
Creates the expression
e1 AND NOT notTerm1 AND NOT notTerm2 .... |
static RexNode |
RexUtil.apply(Mappings.TargetMapping mapping,
RexNode node)
Applies a mapping to an expression.
|
RexNode |
RexShuttle.apply(RexNode expr)
Applies this shuttle to an expression, or returns null if the expression
is null.
|
static <T extends RexNode> |
RexUtil.apply(RexVisitor<T> shuttle,
T[] exprs)
Applies a shuttle to an array of expressions.
|
static void |
RexUtil.apply(RexVisitor<Void> visitor,
List<? extends RexNode> exprs,
RexNode expr)
Applies a visitor to a list of expressions and, if specified, a single
expression.
|
static void |
RexUtil.apply(RexVisitor<Void> visitor,
RexNode[] exprs,
RexNode expr)
Applies a visitor to an array of expressions and, if specified, a single
expression.
|
static void |
RexUtil.apply(RexVisitor<Void> visitor,
RexNode[] exprs,
RexNode expr)
Applies a visitor to an array of expressions and, if specified, a single
expression.
|
static boolean |
RexLiteral.booleanValue(RexNode node) |
static void |
LogicVisitor.collect(RexNode node,
RexNode seek,
RelOptUtil.Logic logic,
List<RelOptUtil.Logic> logicList) |
static boolean |
RexUtil.containsCorrelation(RexNode condition)
Returns whether an expression contains a
RexCorrelVariable. |
static boolean |
RexUtil.containsFieldAccess(RexNode node)
Returns whether a given tree contains any
RexFieldAccess nodes. |
static boolean |
RexUtil.containsInputRef(RexNode node)
Returns whether a given tree contains any {link RexInputRef} nodes.
|
static boolean |
RexMultisetUtil.containsMixing(RexNode node)
Returns true if a node contains a mixing between multiset and
non-multiset calls.
|
static boolean |
RexMultisetUtil.containsMultiset(RexNode node,
boolean deep)
Returns true if node contains a multiset operator, otherwise false.
|
static boolean |
RexOver.containsOver(List<RexNode> exprs,
RexNode condition)
Returns whether an expression list contains an OVER clause.
|
static boolean |
RexOver.containsOver(RexNode expr)
Returns whether an expression contains an OVER clause.
|
static RexTableInputRef |
RexUtil.containsTableInputRef(RexNode node)
Returns whether a given tree contains any {link RexTableInputRef} nodes.
|
SqlNode |
RexToSqlNodeConverterImpl.convertNode(RexNode node) |
SqlNode |
RexToSqlNodeConverter.convertNode(RexNode node)
|
RexNode |
RexBuilder.copy(RexNode expr)
Creates a copy of an expression, which may have been created using a
different RexBuilder and/or
RelDataTypeFactory, using this
RexBuilder. |
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<? extends RexNode> projectList,
RexNode condition,
RelDataType outputRowType,
boolean normalize)
Deprecated.
|
static RexProgramBuilder |
RexProgramBuilder.create(RexBuilder rexBuilder,
RelDataType inputRowType,
List<RexNode> exprList,
List<? extends RexNode> projectList,
RexNode condition,
RelDataType outputRowType,
boolean normalize,
boolean simplify_)
Deprecated.
|
static RexProgramBuilder |
RexProgramBuilder.create(RexBuilder rexBuilder,
RelDataType inputRowType,
List<RexNode> exprList,
List<? extends RexNode> projectList,
RexNode condition,
RelDataType outputRowType,
boolean normalize,
RexSimplify simplify)
Creates a program builder with the same contents as a program.
|
static RexWindowBound |
RexWindowBound.create(SqlNode node,
RexNode rexNode)
Creates window bound.
|
RexNode |
RexBuilder.decodeIntervalOrDecimal(RexNode node)
Retrieves an interval or decimal node's integer representation
|
private static void |
RexUtil.decompose(Set<RexNode> set,
RexNode rexNode)
Tries to decompose the RexNode which is a RexCall into non-literal
RexNodes.
|
RexNode |
RexBuilder.encodeIntervalOrDecimal(RexNode value,
RelDataType type,
boolean checkOverflow)
Casts a decimal's integer representation to a decimal node.
|
private RelOptUtil.Logic |
LogicVisitor.end(RexNode node,
RelOptUtil.Logic arg) |
RexNode |
RexBuilder.ensureType(RelDataType type,
RexNode node,
boolean matchNullability)
Ensures expression is interpreted as a specified type.
|
static boolean |
RexUtil.eq(RexNode e1,
RexNode e2)
Returns whether two
RexNodes are structurally equal. |
static RelOptUtil.Logic |
LogicVisitor.find(RelOptUtil.Logic logic,
List<RexNode> nodes,
RexNode seek)
Finds a suitable logic for evaluating
seek within a list of
expressions. |
static RexSubQuery |
RexUtil.SubQueryFinder.find(RexNode node) |
static RexCall |
RexMultisetUtil.findFirstMultiset(RexNode node,
boolean deep)
Returns a reference to the first found multiset call or null if none was
found
|
static RexCall |
RexUtil.findOperatorCall(SqlOperator operator,
RexNode node)
Returns whether a given node contains a RexCall with a specified operator
|
private static Comparable |
RexLiteral.findValue(RexNode node) |
static RexNode |
RexUtil.flatten(RexBuilder rexBuilder,
RexNode node)
Flattens an expression.
|
private static <C extends RexNode> |
RexUtil.gatherConstraint(Class<C> clazz,
RexNode left,
RexNode right,
Map<RexNode,C> map,
Set<RexNode> excludeSet,
RexBuilder rexBuilder) |
private static <C extends RexNode> |
RexUtil.gatherConstraints(Class<C> clazz,
RexNode predicate,
Map<RexNode,C> map,
Set<RexNode> excludeSet,
RexBuilder rexBuilder) |
RexNode |
RexProgram.gatherExpr(RexNode expr) |
static double |
RexUtil.getSelectivity(RexNode exp)
Returns a guess for the selectivity of an expression.
|
static int |
RexLiteral.intValue(RexNode node) |
static boolean |
RexUtil.isAtomic(RexNode expr) |
private boolean |
RexTransformer.isBoolean(RexNode node) |
static boolean |
RexUtil.isCallTo(RexNode expr,
SqlOperator op)
|
static boolean |
RexUtil.isConstant(RexNode node)
Returns whether node is made up of constants.
|
boolean |
RexProgram.isConstant(RexNode ref)
Returns whether an expression is constant.
|
static boolean |
RexUtil.isDeterministic(RexNode e)
Returns whether a given expression is deterministic.
|
static boolean |
RexUtil.isFlat(RexNode expr)
Returns false if the expression can be optimized by flattening
calls to an associative operator such as AND and OR.
|
static boolean |
RexUtil.isLiteral(RexNode node,
boolean allowCast)
Returns whether a node represents a literal.
|
static boolean |
RexUtil.isLosslessCast(RexNode node)
Returns whether the input is a 'loss-less' cast, that is, a cast from which
the original value of the field can be certainly recovered.
|
private static boolean |
RexSimplify.isLowerBound(RexNode e) |
static boolean |
RexUtil.isNull(RexNode expr)
Returns whether a node represents the NULL value or a series of nested
CAST(NULL AS type) calls. |
boolean |
RexProgram.isNull(RexNode expr)
Returns whether an expression always evaluates to null.
|
static boolean |
RexUtil.isNullabilityCast(RelDataTypeFactory typeFactory,
RexNode node)
Returns whether an expression is a cast just for the purposes of
nullability, not changing any other aspect of the type.
|
private boolean |
RexTransformer.isNullable(RexNode node) |
static boolean |
RexLiteral.isNullLiteral(RexNode node) |
static boolean |
RexUtil.isNullLiteral(RexNode node,
boolean allowCast)
Returns whether a node represents the NULL value.
|
static boolean |
RexUtil.isReferenceOrAccess(RexNode node,
boolean allowCast)
Returns whether a node represents an input reference or field access.
|
private boolean |
RexTransformer.isTransformable(RexNode node) |
private static boolean |
RexSimplify.isUpperBound(RexNode e) |
boolean |
RexChecker.isValid(RexNode expr)
Returns whether an expression is valid.
|
protected RexNode |
RexUtil.ExpressionNormalizer.lookup(RexNode expr) |
RexNode |
RexBuilder.makeAbstractCast(RelDataType type,
RexNode exp)
Creates a call to the CAST operator.
|
RexNode |
RexBuilder.makeCall(SqlOperator op,
RexNode... exprs)
Creates a call with a list of arguments.
|
RexNode |
RexBuilder.makeCast(RelDataType type,
RexNode exp)
Creates a call to the CAST operator.
|
RexNode |
RexBuilder.makeCast(RelDataType type,
RexNode exp,
boolean matchNullability)
Creates a call to the CAST operator, expanding if possible, and optionally
also preserving nullability.
|
private RexNode |
RexBuilder.makeCastBooleanToExact(RelDataType toType,
RexNode exp) |
private RexNode |
RexBuilder.makeCastExactToBoolean(RelDataType toType,
RexNode exp) |
private RexNode |
RexBuilder.makeCastIntervalToExact(RelDataType toType,
RexNode exp) |
RexNode |
RexBuilder.makeFieldAccess(RexNode expr,
int i)
Creates an expression accessing a field with a given ordinal from a
record.
|
RexNode |
RexBuilder.makeFieldAccess(RexNode expr,
String fieldName,
boolean caseSensitive)
Creates an expression accessing a given named field from a record.
|
private RexNode |
RexBuilder.makeFieldAccessInternal(RexNode expr,
RelDataTypeField field)
Creates an expression accessing a given field from a record.
|
static Pair<String,String> |
RexUtil.makeKey(RexNode expr)
Creates a key for
RexNode which is the same as another key of
another RexNode only if the two have both the same type and textual
representation. |
RexNode |
RexBuilder.makeNotNull(RexNode exp)
Makes a cast of a value to NOT NULL;
no-op if the type already has NOT NULL.
|
RexNode |
RexBuilder.makeReinterpretCast(RelDataType type,
RexNode exp,
RexNode checkOverflow)
Makes a reinterpret cast.
|
void |
RexPattern.match(RexNode ptree,
RexAction action)
Calls
action for every combination of tokens for which this
pattern matches. |
RelDataType |
RexBuilder.matchNullability(RelDataType type,
RexNode value)
Ensures that a type's nullability matches a value's nullability.
|
RexNode |
RexBuilder.multiplyDivide(RexNode e,
BigDecimal multiplier,
BigDecimal divider) |
static RexNode |
RexUtil.not(RexNode e)
Negates a logical expression by adding or removing a NOT.
|
(package private) static RexSimplify.Comparison |
RexSimplify.Comparison.of(RexNode e)
Creates a comparison, or returns null.
|
void |
RexAction.onMatch(RexNode[] tokens) |
private static boolean |
RexUtil.overlap(RexNode rexNode,
Set<RexNode> set) |
private static <C extends Comparable<C>> |
RexSimplify.processRange(RexBuilder rexBuilder,
List<RexNode> terms,
Map<String,Pair<com.google.common.collect.Range<C>,List<RexNode>>> rangeTerms,
RexNode term,
RexNode ref,
C v0,
SqlKind comparison) |
private RexNode |
RexUtil.CnfHelper.pull(RexNode rex) |
static RexNode |
RexUtil.pullFactors(RexBuilder rexBuilder,
RexNode node)
Creates an equivalent version of a node where common factors among ORs
are pulled up.
|
protected RexNode |
RexUtil.ExpressionNormalizer.register(RexNode expr) |
RexLocalRef |
RexProgramBuilder.registerInput(RexNode expr)
Registers an expression in the list of common sub-expressions, and
returns a reference to that expression.
|
private RexLocalRef |
RexProgramBuilder.registerInternal(RexNode expr,
boolean force)
Registers an expression in the list of common sub-expressions, and
returns a reference to that expression.
|
RexLocalRef |
RexProgramBuilder.registerOutput(RexNode expr)
Converts an expression expressed in terms of the outputs of this
program into an expression expressed in terms of the inputs,
registers it in the list of common sub-expressions, and returns a
reference to that expression.
|
static boolean |
RexUtil.removeAll(List<RexNode> targets,
RexNode e)
Removes all expressions from a list that are equivalent to a given
expression.
|
private RexNode |
RexUtil.CnfHelper.removeFactor(Map<String,RexNode> factors,
RexNode node) |
static RexNode |
RexUtil.removeNullabilityCast(RelDataTypeFactory typeFactory,
RexNode node)
Removes any casts that change nullability but not type.
|
RexNode |
RexSimplify.removeNullabilityCast(RexNode e)
Removes any casts that change nullability but not type.
|
static boolean |
RexUtil.requiresDecimalExpansion(RexNode expr,
boolean recurse)
Determines whether a
RexCall requires decimal expansion. |
private <C extends Comparable<C>> |
RexSimplify.residue(RexNode ref,
com.google.common.collect.Range<C> r0,
List<RexNode> predicates,
Class<C> clazz)
Weakens a term so that it checks only what is not implied by predicates.
|
static RexNode |
RexUtil.shift(RexNode node,
int offset)
Shifts every
RexInputRef in an expression by offset. |
static RexNode |
RexUtil.shift(RexNode node,
int start,
int offset)
|
static RexNode |
RexUtil.simplify(RexBuilder rexBuilder,
RexNode e)
Deprecated.
Use
RexSimplify.simplify(RexNode),
which allows you to specify an RexExecutor. |
static RexNode |
RexUtil.simplify(RexBuilder rexBuilder,
RexNode e,
boolean unknownAsFalse)
Deprecated.
Use
RexSimplify.simplify(RexNode),
which allows you to specify an RexExecutor. |
RexNode |
RexSimplify.simplify(RexNode e)
Simplifies a boolean expression.
|
private RexNode |
RexSimplify.simplifyIs2(SqlKind kind,
RexNode a) |
private RexNode |
RexSimplify.simplifyIsNotNull(RexNode a) |
static RexNode |
RexUtil.simplifyPreservingType(RexBuilder rexBuilder,
RexNode e)
Deprecated.
Use
RexSimplify.simplifyPreservingType(RexNode),
which allows you to specify an RexExecutor. |
RexNode |
RexSimplify.simplifyPreservingType(RexNode e)
Simplifies a boolean expression, always preserving its type and its
nullability.
|
private <C extends Comparable<C>> |
RexSimplify.simplifyUsingPredicates(RexNode e,
Class<C> clazz) |
static String |
RexLiteral.stringValue(RexNode node) |
static RexNode |
RexUtil.swapColumnReferences(RexBuilder rexBuilder,
RexNode node,
Map<RexTableInputRef,Set<RexTableInputRef>> ec)
Given an expression, it will swap its column references
RexTableInputRef
using the contents in the map (in particular, the first element of the set in the
map value). |
static RexNode |
RexUtil.swapColumnTableReferences(RexBuilder rexBuilder,
RexNode node,
Map<RexTableInputRef,Set<RexTableInputRef>> ec,
Map<RexTableInputRef.RelTableRef,RexTableInputRef.RelTableRef> tableMapping)
Given an expression, it will swap the column references
RexTableInputRef
using the contents in the first map (in particular, the first element of the set
in the map value), and then it will swap the table references contained in its
RexTableInputRef using the contents in the second map. |
static RexNode |
RexUtil.swapTableColumnReferences(RexBuilder rexBuilder,
RexNode node,
Map<RexTableInputRef.RelTableRef,RexTableInputRef.RelTableRef> tableMapping,
Map<RexTableInputRef,Set<RexTableInputRef>> ec)
Given an expression, it will swap the table references contained in its
RexTableInputRef using the contents in the first map, and then
it will swap the column references RexTableInputRef using the contents
in the second map (in particular, the first element of the set in the map value). |
static RexNode |
RexUtil.swapTableReferences(RexBuilder rexBuilder,
RexNode node,
Map<RexTableInputRef.RelTableRef,RexTableInputRef.RelTableRef> tableMapping)
Given an expression, it will swap the table references contained in its
RexTableInputRef using the contents in the map. |
static RexNode |
RexUtil.toCnf(RexBuilder rexBuilder,
int maxCnfNodeCount,
RexNode rex)
Similar to
RexUtil.toCnf(RexBuilder, RexNode); however, it lets you
specify a threshold in the number of nodes that can be created out of
the conversion. |
static RexNode |
RexUtil.toCnf(RexBuilder rexBuilder,
RexNode rex)
Converts an expression to conjunctive normal form (CNF).
|
RexNode |
RexUtil.CnfHelper.toCnf(RexNode rex) |
private RexNode |
RexUtil.CnfHelper.toCnf2(RexNode rex) |
static RexNode |
RexUtil.toDnf(RexBuilder rexBuilder,
RexNode rex)
Converts an expression to disjunctive normal form (DNF).
|
RexNode |
RexUtil.DnfHelper.toDnf(RexNode rex) |
private RexNode |
RexTransformer.transformNullSemantics(RexNode node) |
private void |
RexProgramBuilder.validate(RexNode expr,
int fieldOrdinal) |
static Comparable |
RexLiteral.value(RexNode node) |
protected RexNode[] |
RexShuttle.visitArray(RexNode[] exprs,
boolean[] update)
Visits each of an array of expressions and returns an array of the
results.
|
| Modifier and Type | Method and Description |
|---|---|
private void |
RexProgramBuilder.add(List<RexNode> exprList,
List<RexLocalRef> projectRefList,
RexLocalRef conditionRef,
RelDataType outputRowType,
RexShuttle shuttle,
boolean updateRefs)
Adds a set of expressions, projections and filters, applying a shuttle
first.
|
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.
|
private static void |
RexUtil.addAnd(com.google.common.collect.ImmutableList.Builder<RexNode> builder,
Set<String> digests,
RexNode node) |
private static void |
RexUtil.addOr(com.google.common.collect.ImmutableList.Builder<RexNode> builder,
Set<String> digests,
RexNode node) |
private RexNode |
RexUtil.CnfHelper.and(Iterable<? extends RexNode> nodes) |
private RexNode |
RexUtil.DnfHelper.and(Iterable<? extends RexNode> nodes) |
static RexNode |
RexUtil.andNot(RexBuilder rexBuilder,
RexNode e,
Iterable<? extends RexNode> notTerms)
Creates the expression
e1 AND NOT notTerm1 AND NOT notTerm2 .... |
Iterable<RexNode> |
RexShuttle.apply(Iterable<? extends RexNode> iterable)
Applies this shuttle to each expression in an iterable.
|
static Iterable<RexNode> |
RexUtil.apply(Mappings.TargetMapping mapping,
Iterable<? extends RexNode> nodes)
Applies a mapping to an iterable over expressions.
|
static void |
RexUtil.apply(RexVisitor<Void> visitor,
List<? extends RexNode> exprs,
RexNode expr)
Applies a visitor to a list of expressions and, if specified, a single
expression.
|
private static List<Pair<RexNode,RexNode>> |
RexSimplify.casePairs(RexBuilder rexBuilder,
List<RexNode> operands)
Given "CASE WHEN p1 THEN v1 ...
|
RexCall |
RexOver.clone(RelDataType type,
List<RexNode> operands) |
RexCall |
RexCall.clone(RelDataType type,
List<RexNode> operands)
Creates a new call to the same operator with different operands.
|
RexSubQuery |
RexSubQuery.clone(RelDataType type,
List<RexNode> operands) |
private Map<String,RexNode> |
RexUtil.CnfHelper.commonFactors(List<RexNode> nodes) |
static boolean |
RexUtil.compatibleTypes(List<RexNode> exprs,
RelDataType type,
Litmus litmus)
Returns whether the type of an array of expressions is compatible with a
struct type.
|
private String |
RexExecutorImpl.compile(RexBuilder rexBuilder,
List<RexNode> constExps,
RexToLixTranslator.InputGetter getter) |
private String |
RexExecutorImpl.compile(RexBuilder rexBuilder,
List<RexNode> constExps,
RexToLixTranslator.InputGetter getter,
RelDataType rowType) |
static RexNode |
RexUtil.composeConjunction(RexBuilder rexBuilder,
Iterable<? extends RexNode> nodes,
boolean nullOnEmpty)
Converts a collection of expressions into an AND.
|
static RexNode |
RexUtil.composeDisjunction(RexBuilder rexBuilder,
Iterable<? extends RexNode> nodes)
Converts a collection of expressions into an OR.
|
static RexNode |
RexUtil.composeDisjunction(RexBuilder rexBuilder,
Iterable<? extends RexNode> nodes,
boolean nullOnEmpty)
Converts a collection of expressions into an OR,
optionally returning null if the list is empty.
|
static boolean |
RexUtil.containComplexExprs(List<RexNode> exprs)
Returns whether a list of expressions contains complex expressions, that
is, a call whose arguments are not
RexVariable (or a subtype such
as RexInputRef) or RexLiteral. |
static boolean |
RexUtil.containIdentity(List<? extends RexNode> exprs,
RelDataType rowType,
Litmus litmus)
Returns whether the leading edge of a given array of expressions is
wholly
RexInputRef objects with types corresponding to the
underlying datatype. |
static boolean |
RexUtil.containNoCommonExprs(List<RexNode> exprs,
Litmus litmus)
Returns whether an array of expressions has any common sub-expressions.
|
static boolean |
RexUtil.containNoForwardRefs(List<RexNode> exprs,
RelDataType inputRowType,
Litmus litmus)
Returns whether an array of expressions contains no forward references.
|
(package private) static boolean |
RexUtil.containNoNonTrivialAggs(List<RexNode> exprs,
Litmus litmus)
Returns whether an array of exp contains no aggregate function calls whose
arguments are not
RexInputRefs. |
static boolean |
RexMultisetUtil.containsMultiset(List<RexNode> nodes,
boolean deep)
Returns whether a list of expressions contains a multiset.
|
static boolean |
RexOver.containsOver(List<RexNode> exprs,
RexNode condition)
Returns whether an expression list contains an OVER clause.
|
static boolean |
RexUtil.containsTableInputRef(List<RexNode> nodes)
Returns whether any of the given expression trees contains a
{link RexTableInputRef} node.
|
private SqlNode[] |
RexSqlStandardConvertletTable.convertExpressionList(RexToSqlNodeConverter converter,
List<RexNode> nodes) |
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<? extends RexNode> projectList,
RexNode condition,
RelDataType outputRowType,
boolean normalize)
Deprecated.
|
static RexProgramBuilder |
RexProgramBuilder.create(RexBuilder rexBuilder,
RelDataType inputRowType,
List<RexNode> exprList,
List<? extends RexNode> projectList,
RexNode condition,
RelDataType outputRowType,
boolean normalize)
Deprecated.
|
static RexProgramBuilder |
RexProgramBuilder.create(RexBuilder rexBuilder,
RelDataType inputRowType,
List<RexNode> exprList,
List<? extends RexNode> projectList,
RexNode condition,
RelDataType outputRowType,
boolean normalize,
boolean simplify_)
Deprecated.
|
static RexProgramBuilder |
RexProgramBuilder.create(RexBuilder rexBuilder,
RelDataType inputRowType,
List<RexNode> exprList,
List<? extends RexNode> projectList,
RexNode condition,
RelDataType outputRowType,
boolean normalize,
boolean simplify_)
Deprecated.
|
static RexProgramBuilder |
RexProgramBuilder.create(RexBuilder rexBuilder,
RelDataType inputRowType,
List<RexNode> exprList,
List<? extends RexNode> projectList,
RexNode condition,
RelDataType outputRowType,
boolean normalize,
RexSimplify simplify)
Creates a program builder with the same contents as a program.
|
static RexProgramBuilder |
RexProgramBuilder.create(RexBuilder rexBuilder,
RelDataType inputRowType,
List<RexNode> exprList,
List<? extends RexNode> projectList,
RexNode condition,
RelDataType outputRowType,
boolean normalize,
RexSimplify simplify)
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 RelDataType |
RexUtil.createStructType(RelDataTypeFactory typeFactory,
List<? extends RexNode> exprs,
List<String> names)
Deprecated.
|
static RelDataType |
RexUtil.createStructType(RelDataTypeFactory typeFactory,
List<? extends RexNode> exprs,
List<String> names,
SqlValidatorUtil.Suggester suggester)
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.
|
private static void |
RexUtil.decompose(Set<RexNode> set,
RexNode rexNode)
Tries to decompose the RexNode which is a RexCall into non-literal
RexNodes.
|
RelDataType |
RexBuilder.deriveReturnType(SqlOperator op,
List<? extends RexNode> exprs)
Derives the return type of a call to an operator.
|
static RexSubQuery |
RexUtil.SubQueryFinder.find(Iterable<RexNode> nodes) |
static RelOptUtil.Logic |
LogicVisitor.find(RelOptUtil.Logic logic,
List<RexNode> nodes,
RexNode seek)
Finds a suitable logic for evaluating
seek within a list of
expressions. |
static List<RexNode> |
RexUtil.fixUp(RexBuilder rexBuilder,
List<RexNode> nodes,
List<RelDataType> fieldTypes)
Fixes up the type of all
RexInputRefs in an
expression to match differences in nullability. |
static List<RexNode> |
RexUtil.fixUp(RexBuilder rexBuilder,
List<RexNode> nodes,
RelDataType rowType)
Deprecated.
|
static List<RexNode> |
RexUtil.flatten(List<? extends RexNode> exprs,
SqlOperator op)
Converts a list of operands into a list that is flat with respect to
the given operator.
|
static com.google.common.collect.ImmutableList<RexNode> |
RexUtil.flattenAnd(Iterable<? extends RexNode> nodes)
Flattens a list of AND nodes.
|
static com.google.common.collect.ImmutableList<RexNode> |
RexUtil.flattenOr(Iterable<? extends RexNode> nodes)
Flattens a list of OR nodes.
|
private static void |
RexUtil.flattenRecurse(List<RexNode> list,
List<? extends RexNode> exprs,
SqlOperator op) |
private static void |
RexUtil.flattenRecurse(List<RexNode> list,
List<? extends RexNode> exprs,
SqlOperator op) |
private static <C extends RexNode> |
RexUtil.gatherConstraint(Class<C> clazz,
RexNode left,
RexNode right,
Map<RexNode,C> map,
Set<RexNode> excludeSet,
RexBuilder rexBuilder) |
private static <C extends RexNode> |
RexUtil.gatherConstraint(Class<C> clazz,
RexNode left,
RexNode right,
Map<RexNode,C> map,
Set<RexNode> excludeSet,
RexBuilder rexBuilder) |
private static <C extends RexNode> |
RexUtil.gatherConstraints(Class<C> clazz,
RexNode predicate,
Map<RexNode,C> map,
Set<RexNode> excludeSet,
RexBuilder rexBuilder) |
private static <C extends RexNode> |
RexUtil.gatherConstraints(Class<C> clazz,
RexNode predicate,
Map<RexNode,C> map,
Set<RexNode> excludeSet,
RexBuilder rexBuilder) |
static Set<RexTableInputRef.RelTableRef> |
RexUtil.gatherTableReferences(List<RexNode> nodes)
Gather all table references in input expressions.
|
static List<RexNode> |
RexUtil.generateCastExpressions(RexBuilder rexBuilder,
RelDataType lhsRowType,
List<RexNode> rhsExps)
Generates a cast for a row type.
|
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). |
static RexSubQuery |
RexSubQuery.in(RelNode rel,
com.google.common.collect.ImmutableList<RexNode> nodes)
Creates an IN sub-query.
|
private static boolean |
RexUtil.isFlat(List<? extends RexNode> exprs,
SqlOperator op)
Returns whether a call to
op with exprs as arguments
would be considered "flat". |
static boolean |
RexUtil.isIdentity(List<? extends RexNode> exps,
RelDataType inputRowType)
Returns whether a list of expressions projects the incoming fields.
|
RexNode |
RexBuilder.makeCall(RelDataType returnType,
SqlOperator op,
List<RexNode> exprs)
Creates a call with a list of arguments and a predetermined type.
|
RexNode |
RexBuilder.makeCall(SqlOperator op,
List<? extends RexNode> exprs)
Creates a call with an array of arguments.
|
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,
boolean distinct)
Creates a call to a windowed agg.
|
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,
boolean distinct)
Creates a call to a windowed agg.
|
RexWindow |
RexBuilder.makeWindow(List<RexNode> partitionKeys,
com.google.common.collect.ImmutableList<RexFieldCollation> orderKeys,
RexWindowBound lowerBound,
RexWindowBound upperBound,
boolean isRows)
Creates a window specification.
|
private RexNode |
RexUtil.CnfHelper.or(Iterable<? extends RexNode> nodes) |
private RexNode |
RexUtil.DnfHelper.or(Iterable<? extends RexNode> nodes) |
private static boolean |
RexUtil.overlap(RexNode rexNode,
Set<RexNode> set) |
static <C extends RexNode> |
RexUtil.predicateConstants(Class<C> clazz,
RexBuilder rexBuilder,
List<RexNode> predicates)
Creates a map containing each (e, constant) pair that occurs within
a predicate list.
|
private static <C extends Comparable<C>> |
RexSimplify.processRange(RexBuilder rexBuilder,
List<RexNode> terms,
Map<String,Pair<com.google.common.collect.Range<C>,List<RexNode>>> rangeTerms,
RexNode term,
RexNode ref,
C v0,
SqlKind comparison) |
private static <C extends Comparable<C>> |
RexSimplify.processRange(RexBuilder rexBuilder,
List<RexNode> terms,
Map<String,Pair<com.google.common.collect.Range<C>,List<RexNode>>> rangeTerms,
RexNode term,
RexNode ref,
C v0,
SqlKind comparison) |
private List<RexNode> |
RexUtil.CnfHelper.pullList(List<RexNode> nodes) |
void |
RexExecutor.reduce(RexBuilder rexBuilder,
List<RexNode> constExps,
List<RexNode> reducedValues)
Reduces expressions, and writes their results into
reducedValues. |
void |
RexExecutor.reduce(RexBuilder rexBuilder,
List<RexNode> constExps,
List<RexNode> reducedValues)
Reduces expressions, and writes their results into
reducedValues. |
void |
RexExecutable.reduce(RexBuilder rexBuilder,
List<RexNode> constExps,
List<RexNode> reducedValues) |
void |
RexExecutable.reduce(RexBuilder rexBuilder,
List<RexNode> constExps,
List<RexNode> reducedValues) |
void |
RexExecutorImpl.reduce(RexBuilder rexBuilder,
List<RexNode> constExps,
List<RexNode> reducedValues)
Do constant reduction using generated code.
|
void |
RexExecutorImpl.reduce(RexBuilder rexBuilder,
List<RexNode> constExps,
List<RexNode> reducedValues)
Do constant reduction using generated code.
|
static boolean |
RexUtil.removeAll(List<RexNode> targets,
RexNode e)
Removes all expressions from a list that are equivalent to a given
expression.
|
private RexNode |
RexUtil.CnfHelper.removeFactor(Map<String,RexNode> factors,
RexNode node) |
static boolean |
RexUtil.requiresDecimalExpansion(List<RexNode> operands,
boolean recurse)
Determines whether any operand of a set requires decimal expansion
|
private <C extends Comparable<C>> |
RexSimplify.residue(RexNode ref,
com.google.common.collect.Range<C> r0,
List<RexNode> predicates,
Class<C> clazz)
Weakens a term so that it checks only what is not implied by predicates.
|
static List<RexNode> |
RexUtil.retainDeterministic(List<RexNode> list) |
static Iterable<RexNode> |
RexUtil.shift(Iterable<RexNode> nodes,
int offset)
Shifts every
RexInputRef in an expression by offset. |
(package private) RexNode |
RexSimplify.simplifyAnd2(List<RexNode> terms,
List<RexNode> notTerms) |
(package private) RexNode |
RexSimplify.simplifyAnd2(List<RexNode> terms,
List<RexNode> notTerms) |
static RexNode |
RexUtil.simplifyAnd2(RexBuilder rexBuilder,
List<RexNode> terms,
List<RexNode> notTerms)
Deprecated.
|
static RexNode |
RexUtil.simplifyAnd2(RexBuilder rexBuilder,
List<RexNode> terms,
List<RexNode> notTerms)
Deprecated.
|
(package private) RexNode |
RexSimplify.simplifyAnd2ForUnknownAsFalse(List<RexNode> terms,
List<RexNode> notTerms)
As
RexSimplify.simplifyAnd2(List, List) but we assume that if the expression
returns UNKNOWN it will be interpreted as FALSE. |
(package private) RexNode |
RexSimplify.simplifyAnd2ForUnknownAsFalse(List<RexNode> terms,
List<RexNode> notTerms)
As
RexSimplify.simplifyAnd2(List, List) but we assume that if the expression
returns UNKNOWN it will be interpreted as FALSE. |
private <C extends Comparable<C>> |
RexSimplify.simplifyAnd2ForUnknownAsFalse(List<RexNode> terms,
List<RexNode> notTerms,
Class<C> clazz) |
private <C extends Comparable<C>> |
RexSimplify.simplifyAnd2ForUnknownAsFalse(List<RexNode> terms,
List<RexNode> notTerms,
Class<C> clazz) |
static RexNode |
RexUtil.simplifyAnd2ForUnknownAsFalse(RexBuilder rexBuilder,
List<RexNode> terms,
List<RexNode> notTerms)
Deprecated.
|
static RexNode |
RexUtil.simplifyAnd2ForUnknownAsFalse(RexBuilder rexBuilder,
List<RexNode> terms,
List<RexNode> notTerms)
Deprecated.
|
RexNode |
RexSimplify.simplifyAnds(Iterable<? extends RexNode> nodes)
Simplifies a conjunction of boolean expressions.
|
static RexNode |
RexUtil.simplifyAnds(RexBuilder rexBuilder,
Iterable<? extends RexNode> nodes)
Deprecated.
Use
RexSimplify.simplifyAnds(Iterable),
which allows you to specify an RexExecutor. |
static RexNode |
RexUtil.simplifyAnds(RexBuilder rexBuilder,
Iterable<? extends RexNode> nodes,
boolean unknownAsFalse)
Deprecated.
|
private void |
RexSimplify.simplifyList(List<RexNode> terms) |
RexNode |
RexSimplify.simplifyOrs(List<RexNode> terms)
Simplifies a list of terms and combines them into an OR.
|
static RexNode |
RexUtil.simplifyOrs(RexBuilder rexBuilder,
List<RexNode> terms)
Deprecated.
|
static RexSubQuery |
RexSubQuery.some(RelNode rel,
com.google.common.collect.ImmutableList<RexNode> nodes,
SqlQuantifyOperator op)
Creates a SOME sub-query.
|
static List<String> |
RexUtil.strings(List<RexNode> list)
Transforms a list of expressions to the list of digests.
|
private List<RexNode> |
RexUtil.DnfHelper.toDnfs(List<RexNode> nodes) |
(package private) static RelDataType |
RexSubQuery.type(RelNode rel,
com.google.common.collect.ImmutableList<RexNode> nodes) |
static List<RelDataType> |
RexUtil.types(List<? extends RexNode> nodes)
Transforms a list of expressions into a list of their types.
|
static boolean |
RexVisitorImpl.visitArrayAnd(RexVisitor<Boolean> visitor,
List<RexNode> exprs)
Visits an array of expressions, returning the logical 'and' of their
results.
|
static boolean |
RexVisitorImpl.visitArrayOr(RexVisitor<Boolean> visitor,
List<RexNode> exprs)
Visits an array of expressions, returning the logical 'or' of their
results.
|
protected List<RexNode> |
RexShuttle.visitList(List<? extends RexNode> exprs,
boolean[] update)
Visits each of a list of expressions and returns a list of the
results.
|
void |
RexShuttle.visitList(List<? extends RexNode> exprs,
List<RexNode> outExprs)
Visits a list and writes the results to another list.
|
void |
RexShuttle.visitList(List<? extends RexNode> exprs,
List<RexNode> outExprs)
Visits a list and writes the results to another list.
|
| Constructor and Description |
|---|
Comparison(RexNode ref,
SqlKind kind,
RexLiteral literal) |
LogicVisitor(RexNode seek,
Collection<RelOptUtil.Logic> logicCollection)
Creates a LogicVisitor.
|
RexFieldAccess(RexNode expr,
RelDataTypeField field) |
RexFieldCollation(RexNode left,
Set<SqlKind> right) |
RexProgramBuilder(RexBuilder rexBuilder,
RelDataType inputRowType,
List<RexNode> exprList,
Iterable<? extends RexNode> projectList,
RexNode condition,
RelDataType outputRowType,
boolean normalize,
RexSimplify simplify)
Creates a program builder with the same contents as a program.
|
RexTransformer(RexNode root,
RexBuilder rexBuilder) |
RexWindowBoundBounded(RexNode node) |
RexWindowBoundBounded(SqlKind sqlKind,
RexNode offset) |
SubExprExistsException(RexNode expr) |
| Constructor and Description |
|---|
ExpansionShuttle(List<RexNode> exprs) |
RegisterMidputShuttle(boolean valid,
List<RexNode> localExprList) |
RegisterOutputShuttle(List<RexNode> localExprList) |
RexCall(RelDataType type,
SqlOperator op,
List<? extends RexNode> operands) |
RexCallBinding(RelDataTypeFactory typeFactory,
SqlOperator sqlOperator,
List<? extends RexNode> operands,
List<RelCollation> inputCollations) |
RexCastCallBinding(RelDataTypeFactory typeFactory,
SqlOperator sqlOperator,
List<? extends RexNode> operands,
RelDataType type,
List<RelCollation> inputCollations) |
RexOver(RelDataType type,
SqlAggFunction op,
List<RexNode> operands,
RexWindow window,
boolean distinct)
Creates a RexOver.
|
RexProgram(RelDataType inputRowType,
List<? extends RexNode> exprs,
List<RexLocalRef> projects,
RexLocalRef condition,
RelDataType outputRowType)
Creates a program.
|
RexProgramBuilder(RexBuilder rexBuilder,
RelDataType inputRowType,
List<RexNode> exprList,
Iterable<? extends RexNode> projectList,
RexNode condition,
RelDataType outputRowType,
boolean normalize,
RexSimplify simplify)
Creates a program builder with the same contents as a program.
|
RexProgramBuilder(RexBuilder rexBuilder,
RelDataType inputRowType,
List<RexNode> exprList,
Iterable<? extends RexNode> projectList,
RexNode condition,
RelDataType outputRowType,
boolean normalize,
RexSimplify simplify)
Creates a program builder with the same contents as a program.
|
RexSubQuery(RelDataType type,
SqlOperator op,
com.google.common.collect.ImmutableList<RexNode> operands,
RelNode rel) |
RexWindow(List<RexNode> partitionKeys,
List<RexFieldCollation> orderKeys,
RexWindowBound lowerBound,
RexWindowBound upperBound,
boolean isRows)
Creates a window.
|
| Modifier and Type | Method and Description |
|---|---|
RexNode |
ModifiableView.getConstraint(RexBuilder rexBuilder,
RelDataType tableRowType)
Returns a constraint that each candidate row must satisfy.
|
| Modifier and Type | Method and Description |
|---|---|
Enumerable<Object[]> |
FilterableTable.scan(DataContext root,
List<RexNode> filters)
Returns an enumerator over the rows in this Table.
|
Enumerable<Object[]> |
ProjectableFilterableTable.scan(DataContext root,
List<RexNode> filters,
int[] projects)
Returns an enumerable over the rows in this Table.
|
TableModify |
ModifiableTable.toModificationRel(RelOptCluster cluster,
RelOptTable table,
Prepare.CatalogReader catalogReader,
RelNode child,
TableModify.Operation operation,
List<String> updateColumnList,
List<RexNode> sourceExpressionList,
boolean flattened)
Creates a relational expression that modifies this table.
|
| Modifier and Type | Field and Description |
|---|---|
private RexNode |
ModifiableViewTable.constraint |
| Modifier and Type | Field and Description |
|---|---|
private com.google.common.collect.ImmutableMap<Integer,RexNode> |
ModifiableViewTable.ModifiableViewTableInitializerExpressionFactory.projectMap |
| Modifier and Type | Method and Description |
|---|---|
RexNode |
ModifiableViewTable.getConstraint(RexBuilder rexBuilder,
RelDataType tableRowType) |
RexNode |
ModifiableViewTable.ModifiableViewTableInitializerExpressionFactory.newAttributeInitializer(RelDataType type,
SqlFunction constructor,
int iAttribute,
List<RexNode> constructorArgs,
InitializerContext context) |
RexNode |
ModifiableViewTable.ModifiableViewTableInitializerExpressionFactory.newColumnDefaultValue(RelOptTable table,
int iColumn,
InitializerContext context) |
| Modifier and Type | Method and Description |
|---|---|
RexNode |
ModifiableViewTable.ModifiableViewTableInitializerExpressionFactory.newAttributeInitializer(RelDataType type,
SqlFunction constructor,
int iAttribute,
List<RexNode> constructorArgs,
InitializerContext context) |
| Constructor and Description |
|---|
ModifiableViewTable(Type elementType,
RelProtoDataType rowType,
String viewSql,
List<String> schemaPath,
List<String> viewPath,
Table table,
Path tablePath,
RexNode constraint,
ImmutableIntList columnMapping)
Creates a ModifiableViewTable.
|
| Modifier and Type | Method and Description |
|---|---|
RexNode |
SqlSplittableAggFunction.singleton(RexBuilder rexBuilder,
RelDataType inputRowType,
AggregateCall aggregateCall)
Generates an expression for the value of the aggregate function when
applied to a single row.
|
RexNode |
SqlSplittableAggFunction.CountSplitter.singleton(RexBuilder rexBuilder,
RelDataType inputRowType,
AggregateCall aggregateCall)
Generates an expression for the value of the aggregate function when
applied to a single row.
|
RexNode |
SqlSplittableAggFunction.SelfSplitter.singleton(RexBuilder rexBuilder,
RelDataType inputRowType,
AggregateCall aggregateCall) |
RexNode |
SqlSplittableAggFunction.AbstractSumSplitter.singleton(RexBuilder rexBuilder,
RelDataType inputRowType,
AggregateCall aggregateCall) |
| Modifier and Type | Method and Description |
|---|---|
AggregateCall |
SqlSplittableAggFunction.topSplit(RexBuilder rexBuilder,
SqlSplittableAggFunction.Registry<RexNode> extra,
int offset,
RelDataType inputRowType,
AggregateCall aggregateCall,
int leftSubTotal,
int rightSubTotal)
Generates an aggregate call to merge sub-totals.
|
AggregateCall |
SqlSplittableAggFunction.CountSplitter.topSplit(RexBuilder rexBuilder,
SqlSplittableAggFunction.Registry<RexNode> extra,
int offset,
RelDataType inputRowType,
AggregateCall aggregateCall,
int leftSubTotal,
int rightSubTotal) |
AggregateCall |
SqlSplittableAggFunction.SelfSplitter.topSplit(RexBuilder rexBuilder,
SqlSplittableAggFunction.Registry<RexNode> extra,
int offset,
RelDataType inputRowType,
AggregateCall aggregateCall,
int leftSubTotal,
int rightSubTotal) |
AggregateCall |
SqlSplittableAggFunction.AbstractSumSplitter.topSplit(RexBuilder rexBuilder,
SqlSplittableAggFunction.Registry<RexNode> extra,
int offset,
RelDataType inputRowType,
AggregateCall aggregateCall,
int leftSubTotal,
int rightSubTotal) |
| Modifier and Type | Field and Description |
|---|---|
(package private) RexNode |
SqlToRelConverter.SubQuery.expr |
| Modifier and Type | Field and Description |
|---|---|
private Map<AggregateCall,RexNode> |
SqlToRelConverter.AggConverter.aggCallMapping |
private Map<SqlNode,RexNode> |
SqlToRelConverter.AggConverter.aggMapping |
private List<Pair<RexNode,String>> |
SqlToRelConverter.AggConverter.convertedInputExprs
Input expressions for the group columns and aggregates, in
RexNode format. |
private Map<SqlNode,RexNode> |
SqlToRelConverter.mapConvertedNonCorrSubqs
Mapping of non-correlated sub-queries that have been converted to their
equivalent constants.
|
private List<RexNode> |
SqlToRelConverter.AggConverter.midExprs
Expressions to be evaluated as rows are being placed into the
aggregate's hash table.
|
private Map<String,RexNode> |
SqlToRelConverter.Blackboard.nameToNodeMap |
private List<RexNode> |
SqlToRelConverter.HistogramShuttle.partitionKeys |
| Modifier and Type | Method and Description |
|---|---|
protected RexNode |
SqlToRelConverter.adjustInputRef(SqlToRelConverter.Blackboard bb,
RexInputRef inputRef)
Adjusts the type of a reference to an input field to account for nulls
introduced by outer joins; and adjusts the offset to match the physical
implementation.
|
private RexNode |
StandardConvertletTable.and(RexBuilder rexBuilder,
RexNode a0,
RexNode a1) |
private RexNode |
StandardConvertletTable.case_(RexBuilder rexBuilder,
RexNode... args) |
private RexNode |
SqlToRelConverter.castNullLiteralIfNeeded(RexNode node,
RelDataType type) |
static RexNode |
StandardConvertletTable.castToValidatedType(SqlNode node,
RexNode e,
SqlValidator validator,
RexBuilder rexBuilder)
Casts a RexNode value to the validated type of a SqlCall.
|
RexNode |
StandardConvertletTable.castToValidatedType(SqlRexContext cx,
SqlCall call,
RexNode value)
Casts a RexNode value to the validated type of a SqlCall.
|
RexNode |
AuxiliaryConverter.convert(RexBuilder rexBuilder,
RexNode groupCall,
RexNode e)
Converts an expression.
|
RexNode |
AuxiliaryConverter.Impl.convert(RexBuilder rexBuilder,
RexNode groupCall,
RexNode e) |
RexNode |
StandardConvertletTable.convertAggregateFunction(SqlRexContext cx,
SqlAggFunction fun,
SqlCall call) |
RexNode |
StandardConvertletTable.convertArray(SqlRexContext cx,
SqlArrayValueConstructor op,
SqlCall call) |
RexNode |
StandardConvertletTable.convertBetween(SqlRexContext cx,
SqlBetweenOperator op,
SqlCall call)
Converts a BETWEEN expression.
|
RexNode |
SqlNodeToRexConverterImpl.convertCall(SqlRexContext cx,
SqlCall call) |
RexNode |
SqlNodeToRexConverter.convertCall(SqlRexContext cx,
SqlCall call)
|
RexNode |
StandardConvertletTable.convertCall(SqlRexContext cx,
SqlCall call)
Converts a call to an operator into a
RexCall to the same
operator. |
RexNode |
StandardConvertletTable.AvgVarianceConvertlet.convertCall(SqlRexContext cx,
SqlCall call) |
RexNode |
StandardConvertletTable.TrimConvertlet.convertCall(SqlRexContext cx,
SqlCall call) |
RexNode |
StandardConvertletTable.GreatestConvertlet.convertCall(SqlRexContext cx,
SqlCall call) |
RexNode |
StandardConvertletTable.FloorCeilConvertlet.convertCall(SqlRexContext cx,
SqlCall call) |
RexNode |
StandardConvertletTable.TimestampAddConvertlet.convertCall(SqlRexContext cx,
SqlCall call) |
RexNode |
StandardConvertletTable.TimestampDiffConvertlet.convertCall(SqlRexContext cx,
SqlCall call) |
RexNode |
SqlRexConvertlet.convertCall(SqlRexContext cx,
SqlCall call) |
private RexNode |
StandardConvertletTable.convertCall(SqlRexContext cx,
SqlCall call,
SqlOperator op)
|
RexNode |
StandardConvertletTable.convertCase(SqlRexContext cx,
SqlCase call)
Converts a CASE expression.
|
protected RexNode |
StandardConvertletTable.convertCast(SqlRexContext cx,
SqlCall call) |
RexNode |
StandardConvertletTable.convertDatetimeMinus(SqlRexContext cx,
SqlDatetimeSubtractionOperator op,
SqlCall call) |
RexNode |
InitializerContext.convertExpression(SqlNode e) |
RexNode |
SqlRexContext.convertExpression(SqlNode expr)
|
RexNode |
SqlToRelConverter.convertExpression(SqlNode node)
|
RexNode |
SqlToRelConverter.Blackboard.convertExpression(SqlNode expr) |
RexNode |
SqlToRelConverter.convertExpression(SqlNode node,
Map<String,RexNode> nameToNodeMap)
|
protected RexNode |
SqlToRelConverter.convertExtendedExpression(SqlNode node,
SqlToRelConverter.Blackboard bb)
Converts a non-standard expression.
|
RexNode |
StandardConvertletTable.convertExtract(SqlRexContext cx,
SqlExtractFunction op,
SqlCall call)
Converts a call to the
EXTRACT function. |
protected RexNode |
StandardConvertletTable.convertFloorCeil(SqlRexContext cx,
SqlCall call) |
RexNode |
StandardConvertletTable.convertFunction(SqlRexContext cx,
SqlFunction fun,
SqlCall call) |
private RexNode |
SqlToRelConverter.convertIdentifier(SqlToRelConverter.Blackboard bb,
SqlIdentifier identifier)
Converts an identifier into an expression in a given scope.
|
RexNode |
SqlToRelConverter.Blackboard.convertInterval(SqlIntervalQualifier intervalQualifier) |
private RexNode |
SqlToRelConverter.convertInToOr(SqlToRelConverter.Blackboard bb,
List<RexNode> leftKeys,
SqlNodeList valuesList,
SqlInOperator op)
Converts "x IN (1, 2, ...)" to "x=1 OR x=2 OR ...".
|
private RexNode |
StandardConvertletTable.convertIsDistinctFrom(SqlRexContext cx,
SqlCall call,
boolean neg) |
RexNode |
StandardConvertletTable.convertJdbc(SqlRexContext cx,
SqlJdbcFunctionCall op,
SqlCall call) |
private RexNode |
SqlToRelConverter.convertJoinCondition(SqlToRelConverter.Blackboard bb,
SqlValidatorNamespace leftNamespace,
SqlValidatorNamespace rightNamespace,
SqlNode condition,
JoinConditionType conditionType,
RelNode leftRel,
RelNode rightRel) |
RexNode |
SqlRexContext.convertLiteral(SqlLiteral literal)
Converts a literal.
|
RexNode |
SqlToRelConverter.Blackboard.convertLiteral(SqlLiteral literal) |
RexNode |
SqlNodeToRexConverterImpl.convertLiteral(SqlRexContext cx,
SqlLiteral literal) |
RexNode |
SqlNodeToRexConverter.convertLiteral(SqlRexContext cx,
SqlLiteral literal)
Converts a
SQL literal to a
REX literal. |
RexNode |
StandardConvertletTable.convertLiteralChain(SqlRexContext cx,
SqlLiteralChainOperator op,
SqlCall call)
Converts a LiteralChain expression: that is, concatenates the operands
immediately, to produce a single literal string.
|
RexNode |
StandardConvertletTable.convertMap(SqlRexContext cx,
SqlMapValueConstructor op,
SqlCall call) |
RexNode |
StandardConvertletTable.convertMultiset(SqlRexContext cx,
SqlMultisetValueConstructor op,
SqlCall call) |
RexNode |
StandardConvertletTable.convertMultisetQuery(SqlRexContext cx,
SqlMultisetQueryConstructor op,
SqlCall call) |
private RexNode |
SqlToRelConverter.convertOver(SqlToRelConverter.Blackboard bb,
SqlNode node) |
RexNode |
StandardConvertletTable.convertOverlaps(SqlRexContext cx,
SqlOverlapsOperator op,
SqlCall call)
Converts a call to OVERLAPS.
|
private RexNode |
StandardConvertletTable.convertPlus(SqlRexContext cx,
SqlCall call) |
RexNode |
StandardConvertletTable.convertRow(SqlRexContext cx,
SqlRowOperator op,
SqlCall call)
Converts a ROW.
|
RexNode |
StandardConvertletTable.convertSequenceValue(SqlRexContext cx,
SqlSequenceValueOperator fun,
SqlCall call) |
RexNode |
SqlToRelConverter.Blackboard.convertSortExpression(SqlNode expr,
Set<SqlKind> flags)
Converts an item in an ORDER BY clause, extracting DESC, NULLS LAST
and NULLS FIRST flags first.
|
RexNode |
SqlToRelConverter.NoOpSubQueryConverter.convertSubQuery(SqlCall subQuery,
SqlToRelConverter parentConverter,
boolean isExists,
boolean isExplain) |
RexNode |
SubQueryConverter.convertSubQuery(SqlCall subQuery,
SqlToRelConverter parentConverter,
boolean isExists,
boolean isExplain)
Converts the sub-query to an equivalent expression.
|
private RexNode |
SqlToRelConverter.convertUsing(SqlValidatorNamespace leftNamespace,
SqlValidatorNamespace rightNamespace,
List<String> nameList)
Returns an expression for matching columns of a USING clause or inferred
from NATURAL JOIN.
|
private RexNode |
RelDecorrelator.RemoveCorrelationRexShuttle.createCaseExpression(RexInputRef nullInputRef,
RexLiteral lit,
RexNode rexNode) |
protected RexNode |
RelDecorrelator.decorrelateExpr(RelNode currentRel,
Map<RelNode,RelDecorrelator.Frame> map,
RelDecorrelator.CorelMap cm,
RexNode exp) |
private static RexNode |
StandardConvertletTable.divide(RexBuilder rexBuilder,
RexNode res,
BigDecimal val) |
private static RexNode |
StandardConvertletTable.divideInt(RexBuilder rexBuilder,
RexNode a0,
RexNode a1) |
private RexNode |
SqlToRelConverter.ensureSqlType(RelDataType type,
RexNode node)
Ensures that an expression has a given
SqlTypeName, applying a
cast if necessary. |
private RexNode |
StandardConvertletTable.eq(RexBuilder rexBuilder,
RexNode a0,
RexNode a1) |
private RexNode |
RelStructuredTypeFlattener.RewriteRexShuttle.flattenComparison(RexBuilder rexBuilder,
SqlOperator op,
List<RexNode> exprs) |
private RexNode |
StandardConvertletTable.ge(RexBuilder rexBuilder,
RexNode a0,
RexNode a1) |
protected abstract RexNode |
CorrelationReferenceFinder.handle(RexFieldAccess fieldAccess) |
private RexNode |
StandardConvertletTable.le(RexBuilder rexBuilder,
RexNode a0,
RexNode a1) |
(package private) RexNode |
SqlToRelConverter.Blackboard.lookup(int offset,
SqlToRelConverter.LookupContext lookupContext)
Creates an expression with which to reference the expression whose
offset in its from-list is
offset. |
RexNode |
SqlToRelConverter.AggConverter.lookupAggregates(SqlCall call) |
private static RexNode |
StandardConvertletTable.makeConstructorCall(SqlRexContext cx,
SqlFunction constructor,
List<RexNode> exprs) |
private RexNode |
StandardConvertletTable.minus(RexBuilder rexBuilder,
RexNode a0,
RexNode a1) |
private RexNode |
StandardConvertletTable.mod(RexBuilder rexBuilder,
RelDataType resType,
RexNode res,
BigDecimal val) |
private static RexNode |
StandardConvertletTable.multiply(RexBuilder rexBuilder,
RexNode a0,
RexNode a1) |
RexNode |
InitializerExpressionFactory.newAttributeInitializer(RelDataType type,
SqlFunction constructor,
int iAttribute,
List<RexNode> constructorArgs,
InitializerContext context)
Creates an expression which evaluates to the initializer expression for a
particular attribute of a structured type.
|
RexNode |
NullInitializerExpressionFactory.newAttributeInitializer(RelDataType type,
SqlFunction constructor,
int iAttribute,
List<RexNode> constructorArgs,
InitializerContext context) |
RexNode |
InitializerExpressionFactory.newColumnDefaultValue(RelOptTable table,
int iColumn,
InitializerContext context)
Creates an expression which evaluates to the default value for a
particular column.
|
RexNode |
NullInitializerExpressionFactory.newColumnDefaultValue(RelOptTable table,
int iColumn,
InitializerContext context) |
private RexNode |
StandardConvertletTable.or(RexBuilder rexBuilder,
RexNode a0,
RexNode a1) |
private RexNode |
StandardConvertletTable.plus(RexBuilder rexBuilder,
RexNode a0,
RexNode a1) |
RexNode |
SqlToRelConverter.Blackboard.register(RelNode rel,
JoinRelType joinType) |
RexNode |
SqlToRelConverter.Blackboard.register(RelNode rel,
JoinRelType joinType,
List<RexNode> leftKeys)
Registers a relational expression.
|
protected RexNode |
RelDecorrelator.removeCorrelationExpr(RexNode exp,
boolean projectPulledAboveLeftCorrelator) |
protected RexNode |
RelDecorrelator.removeCorrelationExpr(RexNode exp,
boolean projectPulledAboveLeftCorrelator,
RexInputRef nullIndicator) |
protected RexNode |
RelDecorrelator.removeCorrelationExpr(RexNode exp,
boolean projectPulledAboveLeftCorrelator,
Set<Integer> isCount) |
private RexNode |
RelStructuredTypeFlattener.restructure(RelDataType structuredType) |
private RexNode |
SqlToRelConverter.translateIn(RelOptUtil.Logic logic,
RelNode root,
RexNode rex) |
RexNode |
SqlToRelConverter.Blackboard.visit(SqlCall call) |
RexNode |
SqlToRelConverter.Blackboard.visit(SqlDataTypeSpec type) |
RexNode |
SqlToRelConverter.Blackboard.visit(SqlDynamicParam param) |
RexNode |
SqlToRelConverter.Blackboard.visit(SqlIdentifier id) |
RexNode |
SqlToRelConverter.Blackboard.visit(SqlIntervalQualifier intervalQualifier) |
RexNode |
SqlToRelConverter.Blackboard.visit(SqlLiteral literal) |
RexNode |
SqlToRelConverter.Blackboard.visit(SqlNodeList nodeList) |
RexNode |
RelDecorrelator.RemoveCorrelationRexShuttle.visitCall(RexCall call) |
RexNode |
RelStructuredTypeFlattener.RewriteRexShuttle.visitCall(RexCall rexCall) |
RexNode |
SqlToRelConverter.HistogramShuttle.visitCall(RexCall call) |
RexNode |
DeduplicateCorrelateVariables.DeduplicateCorrelateVariablesShuttle.visitCorrelVariable(RexCorrelVariable variable) |
RexNode |
RelDecorrelator.DecorrelateRexShuttle.visitFieldAccess(RexFieldAccess fieldAccess) |
RexNode |
RelDecorrelator.RemoveCorrelationRexShuttle.visitFieldAccess(RexFieldAccess fieldAccess) |
RexNode |
CorrelationReferenceFinder.MyRexVisitor.visitFieldAccess(RexFieldAccess fieldAccess) |
RexNode |
RelStructuredTypeFlattener.RewriteRexShuttle.visitFieldAccess(RexFieldAccess fieldAccess) |
RexNode |
RelDecorrelator.DecorrelateRexShuttle.visitInputRef(RexInputRef inputRef) |
RexNode |
RelDecorrelator.RemoveCorrelationRexShuttle.visitInputRef(RexInputRef inputRef) |
RexNode |
RelStructuredTypeFlattener.RewriteRexShuttle.visitInputRef(RexInputRef input) |
RexNode |
RelDecorrelator.RemoveCorrelationRexShuttle.visitLiteral(RexLiteral literal) |
RexNode |
DeduplicateCorrelateVariables.DeduplicateCorrelateVariablesShuttle.visitSubQuery(RexSubQuery subQuery) |
RexNode |
CorrelationReferenceFinder.MyRexVisitor.visitSubQuery(RexSubQuery subQuery) |
RexNode |
RelStructuredTypeFlattener.RewriteRexShuttle.visitSubQuery(RexSubQuery subQuery) |
| Modifier and Type | Method and Description |
|---|---|
private static List<RexNode> |
StandardConvertletTable.convertExpressionList(SqlRexContext cx,
List<SqlNode> nodes,
SqlOperandTypeChecker.Consistency consistency) |
private Pair<RexNode,RexNode> |
StandardConvertletTable.convertOverlapsOperand(SqlRexContext cx,
SqlParserPos pos,
SqlNode operand) |
private Pair<RexNode,RexNode> |
StandardConvertletTable.convertOverlapsOperand(SqlRexContext cx,
SqlParserPos pos,
SqlNode operand) |
Map<SqlNode,RexNode> |
SqlToRelConverter.getMapConvertedNonCorrSubqs() |
List<Pair<RexNode,String>> |
SqlToRelConverter.AggConverter.getPreExprs() |
(package private) Pair<RexNode,Map<String,Integer>> |
SqlToRelConverter.Blackboard.lookupExp(SqlQualified qualified)
Returns an expression with which to reference a from-list item.
|
private List<RexNode> |
RelStructuredTypeFlattener.restructureFields(RelDataType structuredType) |
| Modifier and Type | Method and Description |
|---|---|
private void |
SqlToRelConverter.AggConverter.addExpr(RexNode expr,
String name)
Adds an expression, deducing an appropriate name if possible.
|
private RexNode |
StandardConvertletTable.and(RexBuilder rexBuilder,
RexNode a0,
RexNode a1) |
private RexNode |
StandardConvertletTable.case_(RexBuilder rexBuilder,
RexNode... args) |
private RexNode |
SqlToRelConverter.castNullLiteralIfNeeded(RexNode node,
RelDataType type) |
static RexNode |
StandardConvertletTable.castToValidatedType(SqlNode node,
RexNode e,
SqlValidator validator,
RexBuilder rexBuilder)
Casts a RexNode value to the validated type of a SqlCall.
|
RexNode |
StandardConvertletTable.castToValidatedType(SqlRexContext cx,
SqlCall call,
RexNode value)
Casts a RexNode value to the validated type of a SqlCall.
|
protected void |
SqlToRelConverter.collectInsertTargets(SqlInsert call,
RexNode sourceRef,
List<String> targetColumnNames,
List<RexNode> columnExprs)
Given an INSERT statement, collects the list of names to be populated and
the expressions to put in them.
|
RexNode |
AuxiliaryConverter.convert(RexBuilder rexBuilder,
RexNode groupCall,
RexNode e)
Converts an expression.
|
RexNode |
AuxiliaryConverter.Impl.convert(RexBuilder rexBuilder,
RexNode groupCall,
RexNode e) |
private RexNode |
RelDecorrelator.RemoveCorrelationRexShuttle.createCaseExpression(RexInputRef nullInputRef,
RexLiteral lit,
RexNode rexNode) |
private SqlToRelConverter.Blackboard |
SqlToRelConverter.createInsertBlackboard(RelOptTable targetTable,
RexNode sourceRef,
List<String> targetColumnNames)
Creates a blackboard for translating the expressions of generated columns
in an INSERT statement.
|
protected RelNode |
SqlToRelConverter.createJoin(SqlToRelConverter.Blackboard bb,
RelNode leftRel,
RelNode rightRel,
RexNode joinCond,
JoinRelType joinType) |
protected RexNode |
RelDecorrelator.decorrelateExpr(RelNode currentRel,
Map<RelNode,RelDecorrelator.Frame> map,
RelDecorrelator.CorelMap cm,
RexNode exp) |
private static RexNode |
StandardConvertletTable.divide(RexBuilder rexBuilder,
RexNode res,
BigDecimal val) |
private static RexNode |
StandardConvertletTable.divideInt(RexBuilder rexBuilder,
RexNode a0,
RexNode a1) |
private RexNode |
SqlToRelConverter.ensureSqlType(RelDataType type,
RexNode node)
Ensures that an expression has a given
SqlTypeName, applying a
cast if necessary. |
private RexNode |
StandardConvertletTable.eq(RexBuilder rexBuilder,
RexNode a0,
RexNode a1) |
private void |
RelDecorrelator.findCorrelationEquivalent(RelDecorrelator.CorRef correlation,
RexNode e)
Finds a
RexInputRef that is equivalent to a RelDecorrelator.CorRef,
and if found, throws a Util.FoundOne. |
private int |
SqlToRelConverter.findExpr(RexNode seek,
List<RexNode> exprs,
int count) |
private void |
RelStructuredTypeFlattener.flattenInputs(List<RelDataTypeField> fieldList,
RexNode prefix,
List<Pair<RexNode,String>> flattenedExpList)
Generates expressions that reference the flattened input fields from
a given row type.
|
private void |
RelStructuredTypeFlattener.flattenProjection(RelStructuredTypeFlattener.RewriteRexShuttle shuttle,
RexNode exp,
String fieldName,
List<Pair<RexNode,String>> flattenedExps) |
private RexNode |
StandardConvertletTable.ge(RexBuilder rexBuilder,
RexNode a0,
RexNode a1) |
private boolean |
RelStructuredTypeFlattener.isConstructor(RexNode rexNode) |
private boolean |
SqlToRelConverter.Blackboard.isConvertedSubq(RexNode rex)
Determines whether a RexNode corresponds to a sub-query that's been
converted to a constant.
|
private RexNode |
StandardConvertletTable.le(RexBuilder rexBuilder,
RexNode a0,
RexNode a1) |
private int |
SqlToRelConverter.AggConverter.lookupOrCreateGroupExpr(RexNode expr) |
private RexNode |
StandardConvertletTable.minus(RexBuilder rexBuilder,
RexNode a0,
RexNode a1) |
private RexNode |
StandardConvertletTable.mod(RexBuilder rexBuilder,
RelDataType resType,
RexNode res,
BigDecimal val) |
private static RexNode |
StandardConvertletTable.multiply(RexBuilder rexBuilder,
RexNode a0,
RexNode a1) |
private RexNode |
StandardConvertletTable.or(RexBuilder rexBuilder,
RexNode a0,
RexNode a1) |
private RexNode |
StandardConvertletTable.plus(RexBuilder rexBuilder,
RexNode a0,
RexNode a1) |
private boolean |
RelDecorrelator.references(RexNode e,
RelDecorrelator.CorRef correlation) |
protected RexNode |
RelDecorrelator.removeCorrelationExpr(RexNode exp,
boolean projectPulledAboveLeftCorrelator) |
protected RexNode |
RelDecorrelator.removeCorrelationExpr(RexNode exp,
boolean projectPulledAboveLeftCorrelator,
RexInputRef nullIndicator) |
protected RexNode |
RelDecorrelator.removeCorrelationExpr(RexNode exp,
boolean projectPulledAboveLeftCorrelator,
Set<Integer> isCount) |
private RexNode |
SqlToRelConverter.translateIn(RelOptUtil.Logic logic,
RelNode root,
RexNode rex) |
| Modifier and Type | Method and Description |
|---|---|
void |
SqlToRelConverter.addConvertedNonCorrSubqs(Map<SqlNode,RexNode> alreadyConvertedNonCorrSubqs)
Adds to the current map of non-correlated converted sub-queries the
elements from another map that contains non-correlated sub-queries that
have been converted by another SqlToRelConverter.
|
protected void |
SqlToRelConverter.collectInsertTargets(SqlInsert call,
RexNode sourceRef,
List<String> targetColumnNames,
List<RexNode> columnExprs)
Given an INSERT statement, collects the list of names to be populated and
the expressions to put in them.
|
RexNode |
SqlToRelConverter.convertExpression(SqlNode node,
Map<String,RexNode> nameToNodeMap)
|
private RexNode |
SqlToRelConverter.convertInToOr(SqlToRelConverter.Blackboard bb,
List<RexNode> leftKeys,
SqlNodeList valuesList,
SqlInOperator op)
Converts "x IN (1, 2, ...)" to "x=1 OR x=2 OR ...".
|
protected SqlToRelConverter.Blackboard |
SqlToRelConverter.createBlackboard(SqlValidatorScope scope,
Map<String,RexNode> nameToNodeMap,
boolean top)
Factory method for creating translation workspace.
|
private RelNode |
RelDecorrelator.createProjectWithAdditionalExprs(RelNode input,
List<Pair<RexNode,String>> additionalExprs)
Projects all
input output fields plus the additional expressions. |
protected void |
SqlToRelConverter.extraSelectItems(SqlToRelConverter.Blackboard bb,
SqlSelect select,
List<RexNode> exprList,
List<String> nameList,
Collection<String> aliasList,
List<SqlMonotonicity> columnMonotonicityList)
Adds extra select items.
|
private int |
SqlToRelConverter.findExpr(RexNode seek,
List<RexNode> exprs,
int count) |
private RexNode |
RelStructuredTypeFlattener.RewriteRexShuttle.flattenComparison(RexBuilder rexBuilder,
SqlOperator op,
List<RexNode> exprs) |
private void |
RelStructuredTypeFlattener.flattenInputs(List<RelDataTypeField> fieldList,
RexNode prefix,
List<Pair<RexNode,String>> flattenedExpList)
Generates expressions that reference the flattened input fields from
a given row type.
|
private void |
RelStructuredTypeFlattener.flattenNullLiteral(RelDataType type,
List<Pair<RexNode,String>> flattenedExps) |
private void |
RelStructuredTypeFlattener.flattenProjection(RelStructuredTypeFlattener.RewriteRexShuttle shuttle,
RexNode exp,
String fieldName,
List<Pair<RexNode,String>> flattenedExps) |
private void |
RelStructuredTypeFlattener.flattenProjections(RelStructuredTypeFlattener.RewriteRexShuttle shuttle,
List<? extends RexNode> exps,
List<String> fieldNames,
String prefix,
List<Pair<RexNode,String>> flattenedExps) |
private void |
RelStructuredTypeFlattener.flattenProjections(RelStructuredTypeFlattener.RewriteRexShuttle shuttle,
List<? extends RexNode> exps,
List<String> fieldNames,
String prefix,
List<Pair<RexNode,String>> flattenedExps) |
private static RexNode |
StandardConvertletTable.makeConstructorCall(SqlRexContext cx,
SqlFunction constructor,
List<RexNode> exprs) |
RexNode |
InitializerExpressionFactory.newAttributeInitializer(RelDataType type,
SqlFunction constructor,
int iAttribute,
List<RexNode> constructorArgs,
InitializerContext context)
Creates an expression which evaluates to the initializer expression for a
particular attribute of a structured type.
|
RexNode |
NullInitializerExpressionFactory.newAttributeInitializer(RelDataType type,
SqlFunction constructor,
int iAttribute,
List<RexNode> constructorArgs,
InitializerContext context) |
RexNode |
SqlToRelConverter.Blackboard.register(RelNode rel,
JoinRelType joinType,
List<RexNode> leftKeys)
Registers a relational expression.
|
| Constructor and Description |
|---|
Blackboard(SqlValidatorScope scope,
Map<String,RexNode> nameToNodeMap,
boolean top)
Creates a Blackboard.
|
HistogramShuttle(List<RexNode> partitionKeys,
com.google.common.collect.ImmutableList<RexFieldCollation> orderKeys,
RexWindowBound lowerBound,
RexWindowBound upperBound,
SqlWindow window,
boolean distinct) |
| Modifier and Type | Field and Description |
|---|---|
private RexNode |
RelBuilder.AggCallImpl.filter |
| Modifier and Type | Field and Description |
|---|---|
(package private) List<RexNode> |
RelBuilder.Registrar.extraNodes |
private static com.google.common.base.Function<RexNode,String> |
RelBuilder.FN_TYPE |
(package private) com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<RexNode>> |
RelBuilder.GroupKeyImpl.nodeLists |
(package private) com.google.common.collect.ImmutableList<RexNode> |
RelBuilder.GroupKeyImpl.nodes |
private com.google.common.collect.ImmutableList<RexNode> |
RelBuilder.AggCallImpl.operands |
| Modifier and Type | Method and Description |
|---|---|
com.google.common.collect.ImmutableList<RexNode> |
RelBuilder.fields()
Returns references to the fields of the top input.
|
com.google.common.collect.ImmutableList<RexNode> |
RelBuilder.fields(int inputCount,
int inputOrdinal)
Returns references to the fields of a given input.
|
com.google.common.collect.ImmutableList<RexNode> |
RelBuilder.fields(Iterable<String> fieldNames)
Returns references to fields identified by name.
|
com.google.common.collect.ImmutableList<RexNode> |
RelBuilder.fields(List<? extends Number> ordinals)
Returns references to fields for a given list of input ordinals.
|
com.google.common.collect.ImmutableList<RexNode> |
RelBuilder.fields(Mappings.TargetMapping mapping)
Returns references to fields identified by a mapping.
|
com.google.common.collect.ImmutableList<RexNode> |
RelBuilder.fields(RelCollation collation)
Returns references to fields for a given collation.
|
| Constructor and Description |
|---|
AggCallImpl(SqlAggFunction aggFunction,
boolean distinct,
boolean approximate,
RexNode filter,
String alias,
com.google.common.collect.ImmutableList<RexNode> operands) |
| Constructor and Description |
|---|
AggCallImpl(SqlAggFunction aggFunction,
boolean distinct,
boolean approximate,
RexNode filter,
String alias,
com.google.common.collect.ImmutableList<RexNode> operands) |
GroupKeyImpl(com.google.common.collect.ImmutableList<RexNode> nodes,
boolean indicator,
com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<RexNode>> nodeLists,
String alias) |
GroupKeyImpl(com.google.common.collect.ImmutableList<RexNode> nodes,
boolean indicator,
com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<RexNode>> nodeLists,
String alias) |
Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.