public abstract class Values extends AbstractRelNode implements Hintable
RelNode.Context| Modifier and Type | Field and Description |
|---|---|
protected com.google.common.collect.ImmutableList<RelHint> |
hints |
static com.google.common.base.Predicate<? super Values> |
IS_EMPTY
Deprecated.
|
static 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 |
digest, id, rowType, traitSet| Modifier | Constructor and Description |
|---|---|
protected |
Values(RelInput input)
Creates a Values by parsing serialized output.
|
protected |
Values(RelOptCluster cluster,
List<RelHint> hints,
RelDataType rowType,
com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<RexLiteral>> tuples,
RelTraitSet traits)
Creates a new Values.
|
protected |
Values(RelOptCluster cluster,
RelDataType rowType,
com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<RexLiteral>> tuples,
RelTraitSet traits)
Creates a new Values.
|
| Modifier and Type | Method and Description |
|---|---|
@Nullable RelOptCost |
computeSelfCost(RelOptPlanner planner,
RelMetadataQuery mq)
Returns the cost of this plan (not including children).
|
protected RelDataType |
deriveRowType() |
double |
estimateRowCount(RelMetadataQuery mq)
Returns an estimate of the number of rows this relational expression will
return.
|
RelWriter |
explainTerms(RelWriter pw)
Describes the inputs and attributes of this relational expression.
|
com.google.common.collect.ImmutableList<RelHint> |
getHints()
Returns the hints of this relational expressions as an immutable list.
|
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(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, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitattachHints, withHintsexplain, fieldIsNullableprotected final com.google.common.collect.ImmutableList<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(RelOptCluster cluster, List<RelHint> hints, RelDataType rowType, com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<RexLiteral>> tuples, 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(RelOptCluster cluster, RelDataType rowType, com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<RexLiteral>> tuples, 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 rowTypeprotected Values(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(RelInput input)
public com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<RexLiteral>> getTuples()
protected RelDataType deriveRowType()
deriveRowType in class AbstractRelNodepublic @Nullable RelOptCost computeSelfCost(RelOptPlanner planner, RelMetadataQuery mq)
RelNodeNOTE jvs 29-Mar-2006: Don't call this method directly. Instead, use
RelMetadataQuery.getNonCumulativeCost(org.apache.calcite.rel.RelNode), which gives plugins a
chance to override the rel's default ideas about cost.
computeSelfCost in interface RelNodecomputeSelfCost in class AbstractRelNodeplanner - Planner for cost calculationmq - Metadata querypublic double estimateRowCount(RelMetadataQuery mq)
RelNodeNOTE jvs 29-Mar-2006: Don't call this method directly. Instead, use
RelMetadataQuery.getRowCount(org.apache.calcite.rel.RelNode), which gives plugins a chance to
override the rel's default ideas about row count.
estimateRowCount in interface RelNodeestimateRowCount in class AbstractRelNodemq - Metadata querypublic RelWriter explainTerms(RelWriter pw)
AbstractRelNodesuper.explainTerms, then call the
RelWriter.input(String, RelNode)
and
RelWriter.item(String, Object)
methods for each input and attribute.explainTerms in class AbstractRelNodepw - Plan writerCopyright © 2012-2022 Apache Software Foundation. All Rights Reserved.