Package org.apache.calcite.rel.metadata
Class RelMdAllPredicates
java.lang.Object
org.apache.calcite.rel.metadata.RelMdAllPredicates
- All Implemented Interfaces:
MetadataHandler<BuiltInMetadata.AllPredicates>
public class RelMdAllPredicates
extends Object
implements MetadataHandler<BuiltInMetadata.AllPredicates>
Utility to extract Predicates that are present in the (sub)plan
starting at this node.
This should be used to infer whether same filters are applied on a given plan by materialized view rewriting rules.
The output predicates might contain references to columns produced
by TableScan operators (RexTableInputRef
). In turn, each TableScan
operator is identified uniquely by its qualified name and an identifier.
If the provider cannot infer the lineage for any of the expressions contain in any of the predicates, it will return null. Observe that this is different from the empty list of predicates, which means that there are not predicates in the (sub)plan.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@Nullable RelOptPredicateList
getAllPredicates
(HepRelVertex rel, RelMetadataQuery mq) @Nullable RelOptPredicateList
getAllPredicates
(RelSubset rel, RelMetadataQuery mq) @Nullable RelOptPredicateList
getAllPredicates
(Aggregate agg, RelMetadataQuery mq) Extracts predicates for an Aggregate.@Nullable RelOptPredicateList
getAllPredicates
(Calc calc, RelMetadataQuery mq) Extracts predicates for a Calc.@Nullable RelOptPredicateList
getAllPredicates
(Exchange exchange, RelMetadataQuery mq) Extracts predicates for an Exchange.@Nullable RelOptPredicateList
getAllPredicates
(Filter filter, RelMetadataQuery mq) Extracts predicates for a Filter.@Nullable RelOptPredicateList
getAllPredicates
(Join join, RelMetadataQuery mq) Add the Join condition to the list obtained from the input.@Nullable RelOptPredicateList
getAllPredicates
(Project project, RelMetadataQuery mq) Extracts predicates for a project.@Nullable RelOptPredicateList
getAllPredicates
(Sample sample, RelMetadataQuery mq) Extracts predicates for a Sample.@Nullable RelOptPredicateList
getAllPredicates
(SetOp setOp, RelMetadataQuery mq) Extracts predicates for a SetOp.@Nullable RelOptPredicateList
getAllPredicates
(Sort sort, RelMetadataQuery mq) Extracts predicates for a Sort.@Nullable RelOptPredicateList
getAllPredicates
(TableModify tableModify, RelMetadataQuery mq) Extracts predicates for an TableModify.@Nullable RelOptPredicateList
getAllPredicates
(TableScan scan, RelMetadataQuery mq) Extracts predicates for a table scan.@Nullable RelOptPredicateList
getAllPredicates
(RelNode rel, RelMetadataQuery mq) Catch-all implementation forBuiltInMetadata.AllPredicates.getAllPredicates()
, invoked using reflection.getDef()
-
Field Details
-
SOURCE
-
-
Constructor Details
-
RelMdAllPredicates
public RelMdAllPredicates()
-
-
Method Details
-
getDef
- Specified by:
getDef
in interfaceMetadataHandler<BuiltInMetadata.AllPredicates>
-
getAllPredicates
Catch-all implementation forBuiltInMetadata.AllPredicates.getAllPredicates()
, invoked using reflection. -
getAllPredicates
-
getAllPredicates
-
getAllPredicates
Extracts predicates for a table scan. -
getAllPredicates
Extracts predicates for a project. -
getAllPredicates
Extracts predicates for a Filter. -
getAllPredicates
Extracts predicates for a Calc. -
getAllPredicates
Add the Join condition to the list obtained from the input. -
getAllPredicates
Extracts predicates for an Aggregate. -
getAllPredicates
Extracts predicates for an TableModify. -
getAllPredicates
Extracts predicates for a SetOp. -
getAllPredicates
Extracts predicates for a Sample. -
getAllPredicates
Extracts predicates for a Sort. -
getAllPredicates
Extracts predicates for an Exchange.
-