Package org.apache.calcite.rel.logical
Class LogicalValues
- java.lang.Object
-
- org.apache.calcite.rel.AbstractRelNode
-
- org.apache.calcite.rel.core.Values
-
- org.apache.calcite.rel.logical.LogicalValues
-
- All Implemented Interfaces:
java.lang.Cloneable
,RelOptNode
,RelNode
public class LogicalValues extends Values
Sub-class ofValues
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
IS_EMPTY, IS_EMPTY_J, IS_NOT_EMPTY, tuples
-
Fields inherited from class org.apache.calcite.rel.AbstractRelNode
digest, id, rowType, traitSet
-
-
Constructor Summary
Constructors Constructor Description 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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description RelNode
accept(RelShuttle shuttle)
Accepts a visit from a shuttle.RelNode
copy(RelTraitSet traitSet, java.util.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.-
Methods inherited from class org.apache.calcite.rel.core.Values
computeSelfCost, deriveRowType, estimateRowCount, explainTerms, getTuples, getTuples, isEmpty, isNotEmpty
-
Methods inherited from class org.apache.calcite.rel.AbstractRelNode
accept, childrenAccept, collectVariablesSet, collectVariablesUsed, computeDigest, computeSelfCost, explain, getChildExps, getCluster, getCollationList, getConvention, getCorrelVariable, getDescription, getDigest, getExpectedInputRowType, getId, getInput, getInputs, getQuery, getRelTypeName, getRows, getRowType, getTable, getTraitSet, getVariablesSet, getVariablesStopped, isDistinct, isKey, isValid, isValid, metadata, onRegister, recomputeDigest, register, replaceInput, sole, toString
-
-
-
-
Constructor Detail
-
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
public LogicalValues(RelInput input)
Creates a LogicalValues by parsing serialized output.
-
-
Method Detail
-
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
public RelNode copy(RelTraitSet traitSet, java.util.List<RelNode> inputs)
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
public static LogicalValues createEmpty(RelOptCluster cluster, RelDataType rowType)
Creates a LogicalValues that outputs no rows of a given row type.
-
createOneRow
public static LogicalValues createOneRow(RelOptCluster cluster)
Creates a LogicalValues that outputs one row and one column.
-
accept
public RelNode accept(RelShuttle shuttle)
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
-
-