[
https://issues.apache.org/jira/browse/FLINK-40962?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sergey Nuyanzin resolved FLINK-40962.
-------------------------------------
Fix Version/s: 2.5.0
Resolution: Fixed
> LEAD() and 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
> Assignee: Saketh Kurnool
> Priority: Major
> Labels: pull-request-available
> Fix For: 2.5.0
>
>
> h1. Issue
> The `LEAD()` and `LAG()` window functions are 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) and
> LEAD(TIMESTAMP_LTZ)
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)