yunfan created FLINK-33596:
------------------------------
Summary: Support fold expression before transfer to RexNode
Key: FLINK-33596
URL: https://issues.apache.org/jira/browse/FLINK-33596
Project: Flink
Issue Type: Bug
Components: Connectors / Hive
Reporter: yunfan
Hive will fold expression in optimization stage. But flink-hive-parser use
flink optimization.
And flink can't know some hive function can be constant value.
It can be reproduce by follow sql
{code:java}
select distinct(dep), UNIX_TIMESTAMP() from employee {code}
Some hive code reference:
https://github.com/apache/hive/blob/rel/release-2.3.9/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/HiveRexExecutorImpl.java#L62
https://github.com/apache/hive/blob/rel/release-2.3.9/ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java#L1776
https://github.com/apache/hive/blob/rel/release-2.3.9/ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java#L1069
--
This message was sent by Atlassian Jira
(v8.20.10#820010)