[
https://issues.apache.org/jira/browse/FLINK-29703?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17621463#comment-17621463
]
luoyuxia commented on FLINK-29703:
----------------------------------
The reason is the hive function unix_timestamp will call
`SessionState.get().getQueryCurrentTimestamp()` in runtime.
But the SessionState.get() will return null since the SessionState will be
closed in Flink.
Considering `SessionState.get().getQueryCurrentTimestamp()` is actually a fixed
value set in query parse phase.
To fix it, we need to convert the function call `unix_timestamp` to literal
instead of evaluting in runtime siince the value has no difference between
convert it to a literal and evaluating it in runtime.
> Fail to call unix_timestamp in runtime in Hive dialect
> --------------------------------------------------------
>
> Key: FLINK-29703
> URL: https://issues.apache.org/jira/browse/FLINK-29703
> Project: Flink
> Issue Type: Bug
> Components: Connectors / Hive
> Reporter: luoyuxia
> Priority: Major
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)