public abstract class Values
extends org.apache.calcite.rel.AbstractRelNode
implements org.apache.calcite.rel.hint.Hintable
Temporarily copy from calcite to cherry-pick [CALCITE-5107] and will be removed when upgrade the latest calcite.
Modifier and Type | Field and Description |
---|---|
protected com.google.common.collect.ImmutableList<org.apache.calcite.rel.hint.RelHint> |
hints |
static com.google.common.base.Predicate<? super Values> |
IS_EMPTY
Deprecated.
|
static java.util.function.Predicate<? super Values> |
IS_EMPTY_J |
static com.google.common.base.Predicate<? super Values> |
IS_NOT_EMPTY
Deprecated.
|
com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<RexLiteral>> |
tuples |
Modifier | Constructor and Description |
---|---|
|
Values(org.apache.calcite.rel.RelInput input)
Creates a Values by parsing serialized output.
|
protected |
Values(org.apache.calcite.plan.RelOptCluster cluster,
List<org.apache.calcite.rel.hint.RelHint> hints,
org.apache.calcite.rel.type.RelDataType rowType,
com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<RexLiteral>> tuples,
org.apache.calcite.plan.RelTraitSet traits)
Creates a new Values.
|
protected |
Values(org.apache.calcite.plan.RelOptCluster cluster,
org.apache.calcite.rel.type.RelDataType rowType,
com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<RexLiteral>> tuples,
org.apache.calcite.plan.RelTraitSet traits)
Creates a new Values.
|
Modifier and Type | Method and Description |
---|---|
org.apache.calcite.plan.RelOptCost |
computeSelfCost(org.apache.calcite.plan.RelOptPlanner planner,
org.apache.calcite.rel.metadata.RelMetadataQuery mq) |
protected org.apache.calcite.rel.type.RelDataType |
deriveRowType() |
double |
estimateRowCount(org.apache.calcite.rel.metadata.RelMetadataQuery mq) |
org.apache.calcite.rel.RelWriter |
explainTerms(org.apache.calcite.rel.RelWriter pw) |
com.google.common.collect.ImmutableList<org.apache.calcite.rel.hint.RelHint> |
getHints() |
com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<RexLiteral>> |
getTuples()
Returns the rows of literals represented by this Values relational expression.
|
com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<RexLiteral>> |
getTuples(org.apache.calcite.rel.RelInput input) |
static boolean |
isEmpty(Values values)
Predicate, to be used when defining an operand of a
RelOptRule , that returns true if
a Values contains zero tuples. |
static boolean |
isNotEmpty(Values values)
Predicate, to be used when defining an operand of a
RelOptRule , that returns true if
a Values contains one or more tuples. |
accept, accept, childrenAccept, collectVariablesSet, collectVariablesUsed, copy, 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
public static final java.util.function.Predicate<? super Values> IS_EMPTY_J
protected final com.google.common.collect.ImmutableList<org.apache.calcite.rel.hint.RelHint> hints
@Deprecated public static final com.google.common.base.Predicate<? super Values> IS_EMPTY
@Deprecated public static final com.google.common.base.Predicate<? super Values> IS_NOT_EMPTY
public final com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<RexLiteral>> tuples
protected Values(org.apache.calcite.plan.RelOptCluster cluster, List<org.apache.calcite.rel.hint.RelHint> hints, org.apache.calcite.rel.type.RelDataType rowType, com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<RexLiteral>> tuples, org.apache.calcite.plan.RelTraitSet traits)
Note that tuples passed in become owned by this rel (without a deep copy), so caller must not modify them after this call, otherwise bad things will happen.
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 rowTypeprotected Values(org.apache.calcite.plan.RelOptCluster cluster, org.apache.calcite.rel.type.RelDataType rowType, com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<RexLiteral>> tuples, org.apache.calcite.plan.RelTraitSet traits)
Note that tuples passed in become owned by this rel (without a deep copy), so caller must not modify them after this call, otherwise bad things will happen.
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 rowTypepublic Values(org.apache.calcite.rel.RelInput input)
public static boolean isEmpty(Values values)
RelOptRule
, that returns true if
a Values contains zero tuples.
This is the conventional way to represent an empty relational expression. There are several rules that recognize empty relational expressions and prune away that section of the tree.
public static boolean isNotEmpty(Values values)
RelOptRule
, that returns true if
a Values contains one or more tuples.
This is the conventional way to represent an empty relational expression. There are several rules that recognize empty relational expressions and prune away that section of the tree.
public com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<RexLiteral>> getTuples(org.apache.calcite.rel.RelInput input)
public com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<RexLiteral>> getTuples()
protected org.apache.calcite.rel.type.RelDataType deriveRowType()
deriveRowType
in class org.apache.calcite.rel.AbstractRelNode
public org.apache.calcite.plan.RelOptCost computeSelfCost(org.apache.calcite.plan.RelOptPlanner planner, org.apache.calcite.rel.metadata.RelMetadataQuery mq)
computeSelfCost
in interface org.apache.calcite.rel.RelNode
computeSelfCost
in class org.apache.calcite.rel.AbstractRelNode
public double estimateRowCount(org.apache.calcite.rel.metadata.RelMetadataQuery mq)
estimateRowCount
in interface org.apache.calcite.rel.RelNode
estimateRowCount
in class org.apache.calcite.rel.AbstractRelNode
public org.apache.calcite.rel.RelWriter explainTerms(org.apache.calcite.rel.RelWriter pw)
explainTerms
in class org.apache.calcite.rel.AbstractRelNode
public com.google.common.collect.ImmutableList<org.apache.calcite.rel.hint.RelHint> getHints()
getHints
in interface org.apache.calcite.rel.hint.Hintable
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.