Class LogicalValues
- All Implemented Interfaces:
Cloneable,RelOptNode,Hintable,RelNode
Values
not targeted at any particular engine or calling convention.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.calcite.rel.RelNode
RelNode.Context -
Field Summary
Fields inherited from class org.apache.calcite.rel.core.Values
hints, IS_EMPTY, IS_EMPTY_J, IS_NOT_EMPTY, tuplesFields inherited from class org.apache.calcite.rel.AbstractRelNode
digest, id, rowType, traitSet -
Constructor Summary
ConstructorsConstructorDescriptionLogicalValues(RelOptCluster cluster, RelTraitSet traitSet, List<RelHint> hints, RelDataType rowType, com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<RexLiteral>> tuples) Creates a LogicalValues.LogicalValues(RelOptCluster cluster, RelTraitSet traitSet, RelDataType rowType, com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<RexLiteral>> tuples) Creates a LogicalValues.LogicalValues(RelOptCluster cluster, RelDataType rowType, com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<RexLiteral>> tuples) Deprecated.LogicalValues(RelInput input) Creates a LogicalValues by parsing serialized output. -
Method Summary
Modifier and TypeMethodDescriptionaccept(RelShuttle shuttle) Accepts a visit from a shuttle.copy(RelTraitSet traitSet, List<RelNode> inputs) Creates a copy of this relational expression, perhaps changing traits and inputs.static LogicalValuescreate(RelOptCluster cluster, RelDataType rowType, com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<RexLiteral>> tuples) Creates a LogicalValues.static LogicalValuescreateEmpty(RelOptCluster cluster, RelDataType rowType) Creates a LogicalValues that outputs no rows of a given row type.static LogicalValuescreateOneRow(RelOptCluster cluster) Creates a LogicalValues that outputs one row and one column.Returns a new relational expression with the specified hintshintList.Methods inherited from class org.apache.calcite.rel.core.Values
computeSelfCost, deriveRowType, estimateRowCount, explainTerms, getHints, getTuples, getTuples, isEmpty, isNotEmpty, isSingleValueMethods inherited from class org.apache.calcite.rel.AbstractRelNode
accept, childrenAccept, collectVariablesSet, collectVariablesUsed, deepEquals, deepHashCode, equals, explain, getCluster, getConvention, getCorrelVariable, getDescription, getDigest, getExpectedInputRowType, getId, getInput, getInputs, getRelDigest, getRelTypeName, getRowType, getTable, getTraitSet, getVariablesSet, hashCode, isEnforcer, isValid, metadata, onRegister, recomputeDigest, register, replaceInput, sole, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.calcite.rel.hint.Hintable
attachHintsMethods inherited from interface org.apache.calcite.rel.RelNode
explain, fieldIsNullable, stripped
-
Constructor Details
-
LogicalValues
public LogicalValues(RelOptCluster cluster, RelTraitSet traitSet, List<RelHint> hints, RelDataType rowType, com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<RexLiteral>> tuples) Creates a LogicalValues.Use
create(org.apache.calcite.plan.RelOptCluster, org.apache.calcite.rel.type.RelDataType, com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<org.apache.calcite.rex.RexLiteral>>)unless you know what you're doing.- Parameters:
cluster- Cluster that this relational expression belongs tohints- Hints for this noderowType- Row type for tuples produced by this reltuples- 2-dimensional array of tuple values to be produced; outer list contains tuples; each inner list is one tuple; all tuples must be of same length, conforming to rowType
-
LogicalValues
public LogicalValues(RelOptCluster cluster, RelTraitSet traitSet, RelDataType rowType, com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<RexLiteral>> tuples) Creates a LogicalValues.Use
create(org.apache.calcite.plan.RelOptCluster, org.apache.calcite.rel.type.RelDataType, com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<org.apache.calcite.rex.RexLiteral>>)unless you know what you're doing.- Parameters:
cluster- Cluster that this relational expression belongs torowType- Row type for tuples produced by this reltuples- 2-dimensional array of tuple values to be produced; outer list contains tuples; each inner list is one tuple; all tuples must be of same length, conforming to rowType
-
LogicalValues
@Deprecated public LogicalValues(RelOptCluster cluster, RelDataType rowType, com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<RexLiteral>> tuples) Deprecated. -
LogicalValues
Creates a LogicalValues by parsing serialized output.
-
-
Method Details
-
create
public static LogicalValues create(RelOptCluster cluster, RelDataType rowType, com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<RexLiteral>> tuples) Creates a LogicalValues. -
copy
Description copied from interface:RelNodeCreates a copy of this relational expression, perhaps changing traits and inputs.Sub-classes with other important attributes are encouraged to create variants of this method with more parameters.
- Specified by:
copyin interfaceRelNode- Overrides:
copyin classAbstractRelNode- Parameters:
traitSet- Trait setinputs- Inputs- Returns:
- Copy of this relational expression, substituting traits and inputs
-
createEmpty
Creates a LogicalValues that outputs no rows of a given row type. -
createOneRow
Creates a LogicalValues that outputs one row and one column. -
accept
Description copied from interface:RelNodeAccepts a visit from a shuttle.- Specified by:
acceptin interfaceRelNode- Overrides:
acceptin classAbstractRelNode- Parameters:
shuttle- Shuttle- Returns:
- A copy of this node incorporating changes made by the shuttle to this node's children
-
withHints
Description copied from interface:HintableReturns a new relational expression with the specified hintshintList.This method should be overridden by every logical node that supports hint. It is only for internal use during decorrelation.
Sub-class should return a new copy of the relational expression.
The default implementation returns the relational expression directly only because not every kind of relational expression supports hints.
- Returns:
- Relational expression with set up hints
-