Package org.apache.calcite.rel.metadata
Interface Metadata
-
- All Known Subinterfaces:
BuiltInMetadata.All
,BuiltInMetadata.AllPredicates
,BuiltInMetadata.Collation
,BuiltInMetadata.ColumnOrigin
,BuiltInMetadata.ColumnUniqueness
,BuiltInMetadata.CumulativeCost
,BuiltInMetadata.DistinctRowCount
,BuiltInMetadata.Distribution
,BuiltInMetadata.ExplainVisibility
,BuiltInMetadata.ExpressionLineage
,BuiltInMetadata.MaxRowCount
,BuiltInMetadata.Memory
,BuiltInMetadata.MinRowCount
,BuiltInMetadata.NodeTypes
,BuiltInMetadata.NonCumulativeCost
,BuiltInMetadata.Parallelism
,BuiltInMetadata.PercentageOriginalRows
,BuiltInMetadata.PopulationSize
,BuiltInMetadata.Predicates
,BuiltInMetadata.RowCount
,BuiltInMetadata.Selectivity
,BuiltInMetadata.Size
,BuiltInMetadata.TableReferences
,BuiltInMetadata.UniqueKeys
public interface Metadata
Metadata about a relational expression.For particular types of metadata, a sub-class defines one of more methods to query that metadata. Then a
RelMetadataProvider
can offer those kinds of metadata for particular sub-classes ofRelNode
.User code (typically in a planner rule or an implementation of
RelNode.computeSelfCost(org.apache.calcite.plan.RelOptPlanner, RelMetadataQuery)
) acquires aMetadata
instance by callingRelNode.metadata(java.lang.Class<M>, org.apache.calcite.rel.metadata.RelMetadataQuery)
.A
Metadata
instance already knows which particularRelNode
it is describing, so the methods do not pass in theRelNode
. In fact, quite a few metadata methods have no extra parameters. For instance, you can get the row-count as follows:RelNode rel; double rowCount = rel.metadata(RowCount.class).rowCount();
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RelNode
rel()
Returns the relational expression that this metadata is about.
-
-
-
Method Detail
-
rel
RelNode rel()
Returns the relational expression that this metadata is about.
-
-