slinkydeveloper commented on a change in pull request #17256: URL: https://github.com/apache/flink/pull/17256#discussion_r708344224
########## File path: flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/calcite/FlinkPlannerImpl.scala ########## @@ -97,6 +97,7 @@ class FlinkPlannerImpl( typeFactory, SqlValidator.Config.DEFAULT .withIdentifierExpansion(true) + .withCallRewrite(false) // Disables the rewrite of COALESCE Review comment: This creates another issue though, it disables constant folding: ``` optimized rel plan expected:< LogicalProject([$f0=[CAST(10):INTEGER]], empno=[$0], ename...> but was:< LogicalProject([deptno=[COALESCE(10, $8)]], empno=[$0], ename...> ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org