You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "lincoln lee (Jira)" <ji...@apache.org> on 2024/03/11 12:39:06 UTC

[jira] [Updated] (FLINK-34066) LagFunction throw NPE when input argument are not null

     [ https://issues.apache.org/jira/browse/FLINK-34066?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

lincoln lee updated FLINK-34066:
--------------------------------
    Fix Version/s: 1.20.0

> LagFunction throw NPE when input argument are not null
> ------------------------------------------------------
>
>                 Key: FLINK-34066
>                 URL: https://issues.apache.org/jira/browse/FLINK-34066
>             Project: Flink
>          Issue Type: Improvement
>          Components: Table SQL / Planner
>    Affects Versions: 1.18.0
>            Reporter: Yunhong Zheng
>            Assignee: Yunhong Zheng
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.19.0, 1.20.0
>
>
> This issue is related to https://issues.apache.org/jira/browse/FLINK-31967. In FLINK-31967, the NPE error has not been thoroughly fixed. If the select value  LAG(len, 1, cast(null as int)) and  LAG(len, 1, 1) exists together in test case AggregateITCase.testLagAggFunction() as:
> {code:java}
> val sql =
>   s"""
>      |select
>      |  LAG(len, 1, cast(null as int)) OVER w AS nullable_prev_quantity,
>      |  LAG(len, 1, 1) OVER w AS prev_quantity,
>      |  LAG(len) OVER w AS prev_quantity
>      |from src
>      |WINDOW w AS (ORDER BY proctime)
>      |""".stripMargin {code}
> before is:
> {code:java}
> val sql =
>   s"""
>      |select
>      |  LAG(len, 1, cast(null as int)) OVER w AS prev_quantity,
>      |  LAG(len) OVER w AS prev_quantity
>      |from src
>      |WINDOW w AS (ORDER BY proctime)
>      |""".stripMargin {code}
> NPE will throw.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)