Package org.apache.calcite.rel.metadata
Class RelMdTableReferences
java.lang.Object
org.apache.calcite.rel.metadata.RelMdTableReferences
- All Implemented Interfaces:
MetadataHandler<BuiltInMetadata.TableReferences>
public class RelMdTableReferences
extends Object
implements MetadataHandler<BuiltInMetadata.TableReferences>
Default implementation of
RelMetadataQuery.getTableReferences(org.apache.calcite.rel.RelNode)
for the
standard logical algebra.
The goal of this provider is to return all tables used by a given
expression identified uniquely by a RexTableInputRef.RelTableRef
.
Each unique identifier RexTableInputRef.RelTableRef
of a table will equal to the
identifier obtained running RelMdExpressionLineage
over the same plan
node for an expression that refers to the same table.
If tables cannot be obtained, we return null.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetDef()
@Nullable Set<RexTableInputRef.RelTableRef>
getTableReferences
(RelSubset rel, RelMetadataQuery mq) @Nullable Set<RexTableInputRef.RelTableRef>
getTableReferences
(Aggregate rel, RelMetadataQuery mq) Table references from Aggregate.@Nullable Set<RexTableInputRef.RelTableRef>
getTableReferences
(Calc rel, RelMetadataQuery mq) Table references from Calc.@Nullable Set<RexTableInputRef.RelTableRef>
getTableReferences
(Exchange rel, RelMetadataQuery mq) Table references from Exchange.@Nullable Set<RexTableInputRef.RelTableRef>
getTableReferences
(Filter rel, RelMetadataQuery mq) Table references from Filter.@Nullable Set<RexTableInputRef.RelTableRef>
getTableReferences
(Join rel, RelMetadataQuery mq) Table references from Join.@Nullable Set<RexTableInputRef.RelTableRef>
getTableReferences
(Project rel, RelMetadataQuery mq) Table references from Project.@Nullable Set<RexTableInputRef.RelTableRef>
getTableReferences
(Sample rel, RelMetadataQuery mq) Table references from Sample.@Nullable Set<RexTableInputRef.RelTableRef>
getTableReferences
(SetOp rel, RelMetadataQuery mq) Table references from Union, Intersect, Minus.@Nullable Set<RexTableInputRef.RelTableRef>
getTableReferences
(Sort rel, RelMetadataQuery mq) Table references from Sort.@Nullable Set<RexTableInputRef.RelTableRef>
Table references from TableModify.getTableReferences
(TableScan rel, RelMetadataQuery mq) TableScan table reference.@Nullable Set<RexTableInputRef.RelTableRef>
getTableReferences
(Window rel, RelMetadataQuery mq) Table references from Window.@Nullable Set<RexTableInputRef.RelTableRef>
getTableReferences
(RelNode rel, RelMetadataQuery mq)
-
Field Details
-
SOURCE
-
-
Constructor Details
-
RelMdTableReferences
protected RelMdTableReferences()
-
-
Method Details
-
getDef
- Specified by:
getDef
in interfaceMetadataHandler<BuiltInMetadata.TableReferences>
-
getTableReferences
public @Nullable Set<RexTableInputRef.RelTableRef> getTableReferences(RelNode rel, RelMetadataQuery mq) -
getTableReferences
public @Nullable Set<RexTableInputRef.RelTableRef> getTableReferences(RelSubset rel, RelMetadataQuery mq) -
getTableReferences
TableScan table reference. -
getTableReferences
public @Nullable Set<RexTableInputRef.RelTableRef> getTableReferences(Aggregate rel, RelMetadataQuery mq) Table references from Aggregate. -
getTableReferences
public @Nullable Set<RexTableInputRef.RelTableRef> getTableReferences(Join rel, RelMetadataQuery mq) Table references from Join. -
getTableReferences
public @Nullable Set<RexTableInputRef.RelTableRef> getTableReferences(SetOp rel, RelMetadataQuery mq) Table references from Union, Intersect, Minus.For Union operator, we might be able to extract multiple table references.
-
getTableReferences
public @Nullable Set<RexTableInputRef.RelTableRef> getTableReferences(Project rel, RelMetadataQuery mq) Table references from Project. -
getTableReferences
public @Nullable Set<RexTableInputRef.RelTableRef> getTableReferences(Filter rel, RelMetadataQuery mq) Table references from Filter. -
getTableReferences
public @Nullable Set<RexTableInputRef.RelTableRef> getTableReferences(Calc rel, RelMetadataQuery mq) Table references from Calc. -
getTableReferences
public @Nullable Set<RexTableInputRef.RelTableRef> getTableReferences(Sort rel, RelMetadataQuery mq) Table references from Sort. -
getTableReferences
public @Nullable Set<RexTableInputRef.RelTableRef> getTableReferences(TableModify rel, RelMetadataQuery mq) Table references from TableModify. -
getTableReferences
public @Nullable Set<RexTableInputRef.RelTableRef> getTableReferences(Exchange rel, RelMetadataQuery mq) Table references from Exchange. -
getTableReferences
public @Nullable Set<RexTableInputRef.RelTableRef> getTableReferences(Window rel, RelMetadataQuery mq) Table references from Window. -
getTableReferences
public @Nullable Set<RexTableInputRef.RelTableRef> getTableReferences(Sample rel, RelMetadataQuery mq) Table references from Sample.
-