padavan created FLINK-31960:
-------------------------------
Summary: 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
Reporter: padavan
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 find what is problem fix in 2020 but not...
https://github.com/apache/flink/pull/12868
--
This message was sent by Atlassian Jira
(v8.20.10#820010)