[
https://issues.apache.org/jira/browse/FLINK-35792?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17896540#comment-17896540
]
Jim Hughes commented on FLINK-35792:
------------------------------------
[~xuyangzhong] Sounds like between 3.1 and 3.2, we would pick 3.2 in order to
support the syntax fully. Looks like there are 4 different functions called in
`StreamExecRank`?
I think I am hearing that you are suggesting that we do 1 or 2 now and maybe
later we could consider implementing 3.2.
I like the idea; I do not have a preference between 1 and 2. Is one of them
easier to do?
> 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.20.0, 1.19.1
> Reporter: xuyang
> Assignee: xuyang
> Priority: Major
>
> 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)