[
https://issues.apache.org/jira/browse/FLINK-38938?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sergey Nuyanzin updated FLINK-38938:
------------------------------------
Component/s: Table SQL / Planner
> Restore of SQL job with CURRENT_TIMESTAMP fails with CodeGenException
> ---------------------------------------------------------------------
>
> Key: FLINK-38938
> URL: https://issues.apache.org/jira/browse/FLINK-38938
> Project: Flink
> Issue Type: Bug
> Components: Table SQL / Planner
> Affects Versions: 2.0.1, 2.1.1
> Reporter: Sergey Nuyanzin
> Assignee: Sergey Nuyanzin
> Priority: Major
>
> {code:sql}
> SELECT 1, CURRENT_TIMESTAMP();
> {code}
> steps to reproduce
> 1. run job in Flink 2.0.x or 2.1.x
> 2. stop and store
> 3. restore it again
> the last step fails as
> {noformat}
> org.apache.flink.table.planner.codegen.CodeGenException: Unsupported call:
> CURRENT_TIMESTAMP()
> If you think this function should be supported, you can create an issue and
> start a discussion for it.
> at
> org.apache.flink.table.planner.codegen.ExprCodeGenerator.$anonfun$generateCallExpression$10(ExprCodeGenerator.scala:842)
> at scala.Option.getOrElse(Option.scala:189)
> at
> org.apache.flink.table.planner.codegen.ExprCodeGenerator.$anonfun$generateCallExpression$8(ExprCodeGenerator.scala:838)
> at scala.Option.getOrElse(Option.scala:189)
> at
> org.apache.flink.table.planner.codegen.ExprCodeGenerator.generateCallExpression(ExprCodeGenerator.scala:843)
> at
> org.apache.flink.table.planner.codegen.ExprCodeGenerator.visitCall(ExprCodeGenerator.scala:482)
> at
> org.apache.flink.table.planner.codegen.ExprCodeGenerator.visitCall(ExprCodeGenerator.scala:57)
> at org.apache.calcite.rex.RexCall.accept(RexCall.java:189)
> {noformat}
> same will happen for {{CURRENT_TIME}} and {{CURRENT_DATE}}.
> The reason is FLINK-36910
> cc [~gustavodemorais]
> interesting fact that this behavior was fixed with upgrading Calcite to
> 1.36.0 (was done in 2.2.0)
> it means it is actual for 2.0.x and 2.1.x only
--
This message was sent by Atlassian Jira
(v8.20.10#820010)