xuyang created FLINK-35792:
------------------------------
Summary: Sorting by proctime does not work in rank
Key: FLINK-35792
URL: https://issues.apache.org/jira/browse/FLINK-35792
Project: Flink
Issue Type: Bug
Components: Table SQL / Planner
Affects Versions: 1.19.0, 1.20.0
Reporter: xuyang
Take the following sql as an example:
{code:java}
@Test
def test(): Unit = {
val sql =
"""
|SELECT *
|FROM (
| SELECT a, b, c,
| ROW_NUMBER() OVER (PARTITION BY a ORDER BY b, proctime DESC) as
rank_num
| FROM MyTable)
|WHERE rank_num = 1
""".stripMargin
// This rank can't be converted into Deduplicated because it also uses `b`
// as order key.
util.verifyExecPlan(sql)
} {code}
The rank node will not materialize the `proctime` in
`RelTimeIndicatorConverter`, thus the order key `proctime` is always null.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)