Hi everyone, We would like to start a discussion thread on "FLIP-51: Rework of the Expression Design"(Design doc: [1], FLIP: [2]), where we describe how to improve the new java Expressions to work with type inference and convert expression to the calcite RexNode. This is a follow-up plan for FLIP-32[3] and FLIP-37[4]. This FLIP is mostly based on FLIP-37.
This FLIP addresses several shortcomings of current: - New Expressions still use PlannerExpressions to type inference and to RexNode. Flnk-planner and blink-planner have a lot of repetitive code and logic. - Let TableApi and Cacite definitions consistent. - Reduce the complexity of Function development. - Powerful Function for user. Key changes can be summarized as follows: - Improve the interface of FunctionDefinition. - Introduce type inference for built-in functions. - Introduce ExpressionConverter to convert Expression to calcite RexNode. - Remove repetitive code and logic in planners. I also listed type inference and behavior of all built-in functions [5], to verify that the interface is satisfied. After introduce type inference to table-common module, planners should have a unified function behavior. And this gives the community also the chance to quickly discuss types and behavior of functions a last time before they are declared stable. Looking forward to your feedbacks. Thank you. [1] https://docs.google.com/document/d/1yFDyquMo_-VZ59vyhaMshpPtg7p87b9IYdAtMXv5XmM/edit?usp=sharing [2] https://cwiki.apache.org/confluence/display/FLINK/FLIP-51%3A+Rework+of+the+Expression+Design [3] https://cwiki.apache.org/confluence/display/FLINK/FLIP-32%3A+Restructure+flink-table+for+future+contributions [4] https://cwiki.apache.org/confluence/display/FLINK/FLIP-37%3A+Rework+of+the+Table+API+Type+System [5] https://docs.google.com/document/d/1fyVmdGgbO1XmIyQ1BaoG_h5BcNcF3q9UJ1Bj1euO240/edit?usp=sharing Best, Jingsong Lee