public abstract class Values extends AbstractRelNode
| Modifier and Type | Field and Description |
|---|---|
static com.google.common.base.Predicate<? super Values> |
IS_EMPTY
Predicate, to be used when defining an operand of a
RelOptRule,
that returns true if a Values contains zero tuples. |
protected com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<RexLiteral>> |
tuples |
digest, id, rowType, traitSet| Modifier | Constructor and Description |
|---|---|
|
Values(RelInput input)
Creates a Values by parsing serialized output.
|
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 |
|---|---|
RelOptCost |
computeSelfCost(RelOptPlanner planner)
Returns the cost of this plan (not including children).
|
protected RelDataType |
deriveRowType() |
RelWriter |
explainTerms(RelWriter pw)
Describes the inputs and attributes of this relational expression.
|
double |
getRows()
Returns an estimate of the number of rows this relational expression will
return.
|
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) |
accept, accept, childrenAccept, collectVariablesSet, collectVariablesUsed, computeDigest, copy, explain, getChildExps, getCluster, getCollationList, getConvention, getCorrelVariable, getDescription, getDigest, getExpectedInputRowType, getId, getInput, getInputs, getQuery, getRelTypeName, getRowType, getTable, getTraitSet, getVariablesStopped, isDistinct, isKey, isValid, metadata, onRegister, recomputeDigest, register, replaceInput, sole, toStringpublic static final com.google.common.base.Predicate<? super Values> IS_EMPTY
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.
protected final com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<RexLiteral>> tuples
protected 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 rowTypepublic Values(RelInput input)
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 RelOptCost computeSelfCost(RelOptPlanner planner)
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 calculationpublic double getRows()
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.
getRows in interface RelNodegetRows in class AbstractRelNodepublic RelWriter explainTerms(RelWriter pw)
AbstractRelNodesuper.explainTerms, then call the
RelWriterImpl.input(String, RelNode)
and
RelWriterImpl.item(String, Object)
methods for each input and attribute.explainTerms in class AbstractRelNodepw - Plan writerCopyright © 2012–2015 The Apache Software Foundation. All rights reserved.