Hi!

从 Flink 1.13 开始,引入了新的时间类型 timestamp_ltz,对应一个时间点,可以认为是 Java 的
Interval。之间的时间类型 timestamp 可以认为对应一个字符串。具体区别详见 [1]。

现在 current_timestamp 函数会返回 timestamp_ltz,不能直接和 timestamp 类型做运算。

[1]
https://nightlies.apache.org/flink/flink-docs-master/zh/docs/dev/table/timezone/

Pinjie Huang <[email protected]> 于2021年12月13日周一 14:14写道:

> org.apache.flink.client.program.ProgramInvocationException: The main method
> caused an error: org.apache.flink.table.planner.codegen.CodeGenException:
> TIMESTAMP_LTZ only supports diff between the same type.
>

回复