yunfan created FLINK-33478:
------------------------------

             Summary: Fail to call unix_timestamp when it is in filter 
condition 
                 Key: FLINK-33478
                 URL: https://issues.apache.org/jira/browse/FLINK-33478
             Project: Flink
          Issue Type: Bug
          Components: Connectors / Hive
            Reporter: yunfan


It can reproduced by following sql.

select * from foo where cast(unix_timestamp() as bigint) > 0

It caused by we are not do fold expr in filter expression.

And it is supported by default hive latest version:
Code of hive: 
https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java#L3739
https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java#L373
https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java#L1020




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to