Package org.apache.calcite.rel.metadata
Class RelMdDistribution
java.lang.Object
org.apache.calcite.rel.metadata.RelMdDistribution
- All Implemented Interfaces:
MetadataHandler<BuiltInMetadata.Distribution>
public class RelMdDistribution
extends Object
implements MetadataHandler<BuiltInMetadata.Distribution>
RelMdCollation supplies a default implementation of
RelMetadataQuery.distribution(org.apache.calcite.rel.RelNode)
for the standard logical algebra.-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic RelDistribution
calc
(RelMetadataQuery mq, RelNode input, RexProgram program) Helper method to determine aCalc
's distribution.distribution
(BiRel rel, RelMetadataQuery mq) distribution
(Exchange exchange, RelMetadataQuery mq) distribution
(Project project, RelMetadataQuery mq) distribution
(SetOp rel, RelMetadataQuery mq) distribution
(TableModify rel, RelMetadataQuery mq) @Nullable RelDistribution
distribution
(TableScan scan, RelMetadataQuery mq) distribution
(Values values, RelMetadataQuery mq) distribution
(RelNode rel, RelMetadataQuery mq) Fallback method to deduce distribution for any relational expression not handled by a more specific method.distribution
(SingleRel rel, RelMetadataQuery mq) static RelDistribution
exchange
(RelDistribution distribution) Helper method to determine anExchange
's orSortExchange
's distribution.static RelDistribution
filter
(RelMetadataQuery mq, RelNode input) Helper method to determine aFilter
's distribution.getDef()
static RelDistribution
limit
(RelMetadataQuery mq, RelNode input) Helper method to determine a limit's distribution.static RelDistribution
project
(RelMetadataQuery mq, RelNode input, List<? extends RexNode> projects) Helper method to determine aProject
's distribution.static RelDistribution
snapshot
(RelMetadataQuery mq, RelNode input) Helper method to determine aSnapshot
's distribution.static RelDistribution
sort
(RelMetadataQuery mq, RelNode input) Helper method to determine aSort
's distribution.static @Nullable RelDistribution
table
(RelOptTable table) Helper method to determine aTableScan
's distribution.static RelDistribution
values
(RelDataType rowType, com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<RexLiteral>> tuples) Helper method to determine aValues
's distribution.
-
Field Details
-
SOURCE
-
-
Method Details
-
getDef
- Specified by:
getDef
in interfaceMetadataHandler<BuiltInMetadata.Distribution>
-
distribution
Fallback method to deduce distribution for any relational expression not handled by a more specific method.- Parameters:
rel
- Relational expression- Returns:
- Relational expression's distribution
-
distribution
-
distribution
-
distribution
-
distribution
-
distribution
-
distribution
-
distribution
-
distribution
-
table
Helper method to determine aTableScan
's distribution. -
snapshot
Helper method to determine aSnapshot
's distribution. -
sort
Helper method to determine aSort
's distribution. -
filter
Helper method to determine aFilter
's distribution. -
limit
Helper method to determine a limit's distribution. -
calc
Helper method to determine aCalc
's distribution. -
project
public static RelDistribution project(RelMetadataQuery mq, RelNode input, List<? extends RexNode> projects) Helper method to determine aProject
's distribution. -
values
public static RelDistribution values(RelDataType rowType, com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<RexLiteral>> tuples) Helper method to determine aValues
's distribution. -
exchange
Helper method to determine anExchange
's orSortExchange
's distribution.
-