[ https://issues.apache.org/jira/browse/FLINK-7271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17348947#comment-17348947 ]
Wenlong Lyu commented on FLINK-7271: ------------------------------------ hi, [~twalthr] [~xueyu] I investigate a bit on the case, the case still exists, found that it is because we have different presentation on some types like Date/Timestamp/Row etc, comparing with calcite, and the reduced value produced by ExpressionReducer was casted to string and so that we can make a rex node the same as the un-reduced value: cast(String as Date) -- (ExpressionReducer) --> Date (internal format Int) -- auto cast in RexBuilder#makeLiteral --> cast(String as Date) > ExpressionReducer does not optimize string-to-time conversion > ------------------------------------------------------------- > > Key: FLINK-7271 > URL: https://issues.apache.org/jira/browse/FLINK-7271 > Project: Flink > Issue Type: Improvement > Components: Table SQL / Planner > Affects Versions: 1.3.1 > Reporter: Timo Walther > Priority: Minor > Labels: auto-deprioritized-major > > Expressions like {{"1996-11-10".toDate}} or {{"1996-11-10 > 12:12:12".toTimestamp}} are not recognized by the ExpressionReducer and are > evaluated during runtime instead of pre-flight phase. In order to optimize > the runtime we should allow constant expression reduction here. -- This message was sent by Atlassian Jira (v8.3.4#803005)