You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Arvid Heise (Jira)" <ji...@apache.org> on 2026/08/31 09:41:00 UTC
[jira] [Resolved] (FLINK-40481) SHOW CREATE MATERIALIZED TABLE displays a future timestamp for FROM_NOW() instead of past
[ https://issues.apache.org/jira/browse/FLINK-40481?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Arvid Heise resolved FLINK-40481.
---------------------------------
Fix Version/s: 2.4.0
Resolution: Fixed
> SHOW CREATE MATERIALIZED TABLE displays a future timestamp for FROM_NOW(<interval>) instead of past
> ---------------------------------------------------------------------------------------------------
>
> Key: FLINK-40481
> URL: https://issues.apache.org/jira/browse/FLINK-40481
> Project: Flink
> Issue Type: Bug
> Components: Table SQL / API
> Affects Versions: 2.3.0
> Reporter: Arvid Heise
> Assignee: Arvid Heise
> Priority: Minor
> Labels: pull-request-available
> Fix For: 2.4.0
>
>
> {noformat}
> CREATE MATERIALIZED TABLE mt
> START_MODE = FROM_NOW(INTERVAL '3' MINUTE)
> AS SELECT ...
> SHOW CREATE TABLE mt;
> -- START_MODE = FROM_NOW(INTERVAL '3' MINUTE) /* Evaluated to FROM_TIMESTAMP(TIMESTAMP '2026-08-27 09:43:12') at execution */
> {noformat}
> Statement created at {{2026-08-27 09:40:12}}. The comment claims resolution to {{09:43:12}} — three minutes in the future. The actual runtime resolution of {{FROM_NOW(<interval>)}} reads from three minutes in the past (documented semantics, matching Kafka's relative-offset behavior); only the {{SHOW CREATE}} annotation is wrong.
> {{ShowCreateUtil.extractStartMode}} builds the comment with:
> {code:java}
> LocalDateTime.now().plus(amount).toInstant(ZoneOffset.UTC)
> {code}
> which should be {{.minus(amount)}}. Introduced in FLINK-39323.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)