[
https://issues.apache.org/jira/browse/FLINK-31960?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Martijn Visser updated FLINK-31960:
-----------------------------------
Affects Version/s: 1.17.0
> SQL OverBy. Error on a code that does not exist
> ------------------------------------------------
>
> Key: FLINK-31960
> URL: https://issues.apache.org/jira/browse/FLINK-31960
> Project: Flink
> Issue Type: Bug
> Components: Table SQL / API
> Affects Versions: 1.17.0
> Reporter: padavan
> Priority: Major
>
> Hello. I use latest Flink. And want make query with LEAD, LAG function , but
> i got error
> {noformat}
> SQL validation failed. From line 1, column 138 to line 1, column 142:
> ROW/RANGE not allowed with RANK, DENSE_RANK or ROW_NUMBER functions{noformat}
> But i dont use RANK, DENSE_RANK or ROW_NUMBER functions in my code
> {code:java}
> Table win = te.sqlQuery(
> "SELECT userId, " +
> "lead(`count`, 1) over w as ld, " +
> "lag(`count`, 1) over w as lg " +
> "FROM users " +
> "WINDOW w AS (" +
> "PARTITION BY userId " +
> "ORDER BY proctime " +
> "RANGE BETWEEN INTERVAL '1' MINUTE PRECEDING AND CURRENT ROW)"
> );{code}
>
> I found what this problem is fix in 2020 but not...
> [https://github.com/apache/flink/pull/12868]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)