Jark Wu created FLINK-14540:
-------------------------------
Summary: Rethink of TableSource#explainSource()
Key: FLINK-14540
URL:
https://issues.apache.org/jira/browse/FLINK-14540 Project: Flink
Issue Type: Improvement
Components: Table SQL / API
Reporter: Jark Wu
In FLINK-12399 and FLINK-14132, the returned String of {{TableSource#explainSource}} is used as part of digest of {{TableScan}}. User have to give the correct digest for projectable or filterable or limitable sources when pushdown has been tried. They have to overwrite {{TableSource#explainSource()}} to reflect such changes.
However, I have some concerns about this:
1) such important restriction is not mentioned in the Javadoc of {{TableSource#explainSource()}}, {{ProjectableTableSouce}} and {{FilterableTableSource}}.
2) It pushes some dirty work to users which can be done by the framework, it makes connectors more difficult to be developed **correctly** (by reflecting all the push-downed information correctly).
3) the explainTerm/digest format of source maybe not unified and fully described.
Regarding how to generate digest by planner, I think we can put the push-downed information in {{TableSourceTable}} (e.g. we already put {{selectedFields}} in it), and generate the digest using {{TableSourceTable}}.
But I may miss something that we have to push the changes to explainSource. We can discuss this under this JIRA issue.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)