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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable RelOptPredicateListgetAllPredicates(HepRelVertex rel, RelMetadataQuery mq) @Nullable RelOptPredicateListgetAllPredicates(RelSubset rel, RelMetadataQuery mq) @Nullable RelOptPredicateListgetAllPredicates(Aggregate agg, RelMetadataQuery mq) Extracts predicates for an Aggregate.@Nullable RelOptPredicateListgetAllPredicates(Calc calc, RelMetadataQuery mq) Extracts predicates for a Calc.@Nullable RelOptPredicateListgetAllPredicates(Exchange exchange, RelMetadataQuery mq) Extracts predicates for an Exchange.@Nullable RelOptPredicateListgetAllPredicates(Filter filter, RelMetadataQuery mq) Extracts predicates for a Filter.@Nullable RelOptPredicateListgetAllPredicates(Join join, RelMetadataQuery mq) Add the Join condition to the list obtained from the input.@Nullable RelOptPredicateListgetAllPredicates(Project project, RelMetadataQuery mq) Extracts predicates for a project.@Nullable RelOptPredicateListgetAllPredicates(Sample sample, RelMetadataQuery mq) Extracts predicates for a Sample.@Nullable RelOptPredicateListgetAllPredicates(SetOp setOp, RelMetadataQuery mq) Extracts predicates for a SetOp.@Nullable RelOptPredicateListgetAllPredicates(Sort sort, RelMetadataQuery mq) Extracts predicates for a Sort.@Nullable RelOptPredicateListgetAllPredicates(TableModify tableModify, RelMetadataQuery mq) Extracts predicates for an TableModify.@Nullable RelOptPredicateListgetAllPredicates(TableScan scan, RelMetadataQuery mq) Extracts predicates for a table scan.@Nullable RelOptPredicateListgetAllPredicates(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:
getDefin 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.
-