jackylau created FLINK-14053:
--------------------------------
Summary: blink planner dense_rank corner case bug
Key: FLINK-14053
URL:
https://issues.apache.org/jira/browse/FLINK-14053 Project: Flink
Issue Type: Bug
Components: Table SQL / Planner
Affects Versions: 1.9.0
Reporter: jackylau
Fix For: 1.10.0
sql :
val rank =
"""
|SELECT
| gradeId,
| classId,
| stuId,
| score,
| dense_rank() OVER (PARTITION BY gradeId, classId ORDER BY score asc) as dense_rank_num
|FROM student
|
""".stripMargin
sample date:
row("grade2", "class2", "0006", 90),
row("grade1", "class2", "0007", 90),
row("grade1", "class1", "0001", 95),
row("grade1", "class1", "0002", 94),
row("grade1", "class1", "0003", 97),
row("grade1", "class1", "0004", 95),
row("grade1", "class1", "0005", 0)
the dense_rank ranks from 0, but it should be from 1
--
This message was sent by Atlassian Jira
(v8.3.2#803003)