[
https://issues.apache.org/jira/browse/FLINK-40962?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18126757#comment-18126757
]
ChenZhuo commented on FLINK-40962:
----------------------------------
Hi, I would like to work on this issue. My proposed approach is to add a
precision-preserving TIMESTAMP_LTZ implementation to the existing batch
LeadLagAggFunction and wire it into AggFunctionFactory. Since LAG and LEAD
share this path, I will cover both with batch regression tests, including
null/default handling and timestamp precision.
Could a committer please assign this issue to me (JIRA username: chenzhuo)?
Thanks!
> LAG() unsupported for TIMESTAMP_LTZ arguments in batch mode
> -----------------------------------------------------------
>
> Key: FLINK-40962
> URL: https://issues.apache.org/jira/browse/FLINK-40962
> Project: Flink
> Issue Type: Improvement
> Components: Table SQL / Planner
> Reporter: Saketh Kurnool
> Priority: Major
>
> h1. Issue
> The `LAG()` window function is rejected for `TIMESTAMP_LTZ` argument types in
> batch/snapshot mode. It works in streaming mode. Concretely:
>
> {code:java}
> Failed to (re)submit Job to Flink: {"errors":["Unsupported call:
> LAG(TIMESTAMP_LTZ(3)) \nIf you think this function should be supported, you
> can create an issue and start a discussion for it."]}{code}
> h1. Proposal
> Add the missing `TIMESTAMP_LTZ` case to
> `AggFunctionFactory.createBatchLeadLagAggFunction`
> h2. Files to modify
> * LeadLagAggFunction.java: add a `LocalZonedTimestampLeadLagAggFunction`
> static inner class that returns `DataTypes.TIMESTAMP_LTZ` as the result type
> * AggFunctionFactory.scala: add a case for `TIMESTAMP_LTZ` to
> `createBatchLeadLagAggFunction` to return a
> `LocalZonedTimestampLeadLagAggFunction`
> * TimestampITCase.scala: add IT coverage for LAG(TIMESTAMP_LTZ)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)