public class Sample extends SingleRel
In SQL, a sample is expressed using the TABLESAMPLE BERNOULLI
or
SYSTEM
keyword applied to a table, view or sub-query.
RelNode.Context
Modifier and Type | Field and Description |
---|---|
private RelOptSamplingParameters |
params |
digest, id, rowType, traitSet
Constructor and Description |
---|
Sample(RelInput input)
Creates a Sample by parsing serialized output.
|
Sample(RelOptCluster cluster,
RelNode child,
RelOptSamplingParameters params) |
Modifier and Type | Method and Description |
---|---|
RelNode |
copy(RelTraitSet traitSet,
java.util.List<RelNode> inputs)
Creates a copy of this relational expression, perhaps changing traits and
inputs.
|
RelWriter |
explainTerms(RelWriter pw)
Describes the inputs and attributes of this relational expression.
|
RelOptSamplingParameters |
getSamplingParameters()
Retrieve the sampling parameters for this Sample.
|
private static RelOptSamplingParameters |
getSamplingParameters(RelInput input) |
childrenAccept, deriveRowType, estimateRowCount, getInput, getInputs, replaceInput
accept, accept, collectVariablesSet, collectVariablesUsed, computeDigest, computeSelfCost, computeSelfCost, explain, getChildExps, getCluster, getCollationList, getConvention, getCorrelVariable, getDescription, getDigest, getExpectedInputRowType, getId, getInput, getQuery, getRelTypeName, getRows, getRowType, getTable, getTraitSet, getVariablesSet, getVariablesStopped, isDistinct, isKey, isValid, isValid, metadata, onRegister, recomputeDigest, register, sole, toString
private final RelOptSamplingParameters params
public Sample(RelOptCluster cluster, RelNode child, RelOptSamplingParameters params)
public Sample(RelInput input)
private static RelOptSamplingParameters getSamplingParameters(RelInput input)
public RelNode copy(RelTraitSet traitSet, java.util.List<RelNode> inputs)
RelNode
Sub-classes with other important attributes are encouraged to create variants of this method with more parameters.
copy
in interface RelNode
copy
in class AbstractRelNode
traitSet
- Trait setinputs
- Inputspublic RelOptSamplingParameters getSamplingParameters()
public RelWriter explainTerms(RelWriter pw)
AbstractRelNode
super.explainTerms
, then call the
RelWriter.input(String, RelNode)
and
RelWriterImpl.item(String, Object)
methods for each input and attribute.explainTerms
in class SingleRel
pw
- Plan writerCopyright © 2012–2019 The Apache Software Foundation. All rights reserved.