Class Sample

All Implemented Interfaces:
Cloneable, RelOptNode, RelNode

public class Sample extends SingleRel
Relational expression that returns a sample of the rows from its input.

In SQL, a sample is expressed using the TABLESAMPLE BERNOULLI or SYSTEM keyword applied to a table, view or sub-query.

  • Constructor Details

  • Method Details

    • copy

      public RelNode copy(RelTraitSet traitSet, 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 interface RelNode
      Overrides:
      copy in class AbstractRelNode
      Parameters:
      traitSet - Trait set
      inputs - Inputs
      Returns:
      Copy of this relational expression, substituting traits and inputs
    • getSamplingParameters

      public RelOptSamplingParameters getSamplingParameters()
      Retrieve the sampling parameters for this Sample.
    • explainTerms

      public RelWriter explainTerms(RelWriter pw)
      Description copied from class: AbstractRelNode
      Describes the inputs and attributes of this relational expression. Each node should call super.explainTerms, then call the RelWriter.input(String, RelNode) and RelWriter.item(String, Object) methods for each input and attribute.
      Overrides:
      explainTerms in class SingleRel
      Parameters:
      pw - Plan writer
      Returns:
      Plan writer for fluent-explain pattern