[
https://issues.apache.org/jira/browse/FLINK-40962?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Saketh Kurnool updated FLINK-40962:
-----------------------------------
Description:
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
*
`flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/aggfunctions/LeadLagAggFunction.java`:
add a `LocalZonedTimestampLeadLagAggFunction` static inner class that returns
`DataTypes.TIMESTAMP_LTZ` as the result type
*
`flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/plan/utils/AggFunctionFactory.scala`:
add a case for `TIMESTAMP_LTZ` to `createBatchLeadLagAggFunction` to return a
`LocalZonedTimestampLeadLagAggFunction`
was:
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
*
`flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/aggfunctions/LeadLagAggFunction.java`:
add a `LocalZonedTimestampLeadLagAggFunction` static inner class that returns
`DataTypes.TIMESTAMP_LTZ` as the result type
*
`flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/plan/utils/AggFunctionFactory.scala`:
add a case for `TIMESTAMP_LTZ` to `createBatchLeadLagAggFunction` to return a
`LocalZonedTimestampLeadLagAggFunction`
> 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
> *
> `flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/aggfunctions/LeadLagAggFunction.java`:
> add a `LocalZonedTimestampLeadLagAggFunction` static inner class that
> returns `DataTypes.TIMESTAMP_LTZ` as the result type
> *
> `flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/plan/utils/AggFunctionFactory.scala`:
> add a case for `TIMESTAMP_LTZ` to `createBatchLeadLagAggFunction` to return
> a `LocalZonedTimestampLeadLagAggFunction`
--
This message was sent by Atlassian Jira
(v8.20.10#820010)