[ https://issues.apache.org/jira/browse/FLINK-3754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15253850#comment-15253850 ]
ASF GitHub Bot commented on FLINK-3754: --------------------------------------- Github user yjshen commented on the pull request: https://github.com/apache/flink/pull/1916#issuecomment-213411425 For ease of review, I would like to explain this RP with more details. While table api are called to construct a query, it was first constructed as a operator tree, `LogicalNode` is used to express the tree node. Therefore, after we finished constructing a query and about to translate it into a dataset/datastream program, the constructed logical plan looks like: ``` Aggregate(List of group by, List of aggregate) +- Filter (condition expression) +- Union +- Project (select column expression) +- TableScan(DS1) +- Project (select column expression) +- TableScan(DS2) ``` At this time, only the leaf node: TableScan (`CatalogNode` in current implementation) is equipped with type information, in order to do plan validation, we need to **annotate** the full logical plan with type information first and use type information to do **validate** works. > Add a validation phase before construct RelNode using TableAPI > -------------------------------------------------------------- > > Key: FLINK-3754 > URL: https://issues.apache.org/jira/browse/FLINK-3754 > Project: Flink > Issue Type: Improvement > Components: Table API > Affects Versions: 1.0.0 > Reporter: Yijie Shen > Assignee: Yijie Shen > > Unlike sql string's execution, which have a separate validation phase before > RelNode construction, Table API lacks the counterparts and the validation is > scattered in many places. > I suggest to add a single validation phase and detect problems as early as > possible. -- This message was sent by Atlassian JIRA (v6.3.4#6332)