godfrey he created FLINK-11822:
----------------------------------
Summary: Introduce Flink metadata handler
Key: FLINK-11822
URL: https://issues.apache.org/jira/browse/FLINK-11822
Project: Flink
Issue Type: New Feature
Components: API / Table SQL
Reporter: godfrey he
Assignee: godfrey he
Calcite has defined various metadata handlers(e.g. `RowCount`, `Selectivity`)
and provided default implementation(e.g. `RelMdRowCount`, `RelMdSelectivity`).
However, the default implementation can't completely meet our requirements,
e.g. some of its logic is incompleteļ¼and some `RelNode`s are not considered.
There are two options to meet our requirements:
option 1. Extends from default implementation, overrides method to improve its
logic, add new methods for new `RelNode`. The advantage of this option is we
just need to focus on the additions and modifications. However, its
shortcomings are also obvious: we have no control over the code of non-override
methods in default implementation classes especially when upgrading the Calcite
version.
option 2. Extends from metadata handler interfaces, reimplement all the logic.
Its shortcomings are very obvious, however we can control all the code logic
that's what we want.
so we choose option 2!
In this jira, only basic metadata handles will be introduce, including:
`FlinkRelMdPercentageOriginalRow`,
`FlinkRelMdNonCumulativeCost`,
`FlinkRelMdCumulativeCost`,
`FlinkRelMdRowCount`,
`FlinkRelMdSize`,
`FlinkRelMdSelectivity`,
`FlinkRelMdDistinctRowCoun`,
`FlinkRelMdPopulationSize`,
`FlinkRelMdColumnUniqueness`,
`FlinkRelMdUniqueKeys`
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)