public interface Metadata
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 of RelNode.
User code (typically in a planner rule or an implementation of
RelNode.computeSelfCost(org.apache.calcite.plan.RelOptPlanner))
acquires a Metadata instance by calling RelNode.metadata(java.lang.Class<M>).
A Metadata instance already knows which particular RelNode
it is describing, so the methods do not pass in the RelNode. 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();
RelNode rel()
Copyright © 2012–2015 The Apache Software Foundation. All rights reserved.