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, tuples
Fields inherited from class org.apache.calcite.rel.AbstractRelNode
digest, id, rowType, traitSet
-
Constructor Summary
ConstructorDescriptionLogicalValues
(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 LogicalValues
create
(RelOptCluster cluster, RelDataType rowType, com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<RexLiteral>> tuples) Creates a LogicalValues.static LogicalValues
createEmpty
(RelOptCluster cluster, RelDataType rowType) Creates a LogicalValues that outputs no rows of a given row type.static LogicalValues
createOneRow
(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, isSingleValue
Methods 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, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.calcite.rel.hint.Hintable
attachHints
Methods 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:RelNode
Creates 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:
copy
in interfaceRelNode
- Overrides:
copy
in 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:RelNode
Accepts a visit from a shuttle.- Specified by:
accept
in interfaceRelNode
- Overrides:
accept
in 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:Hintable
Returns 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
-