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.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---