Skip to content

Commit

Permalink
validate 'Number of sorting keys must be greater than zero'
Browse files Browse the repository at this point in the history
  • Loading branch information
dcoliversun committed Sep 3, 2024
1 parent efa5b02 commit b1bd9e2
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,20 @@ class VeloxWindowExpressionSuite extends WholeStageTransformerSuite {
}
}

test("test overlapping partition and sorting keys") {
runAndCompare(
"""
|WITH t AS (
|SELECT
| l_linenumber,
| row_number() over (partition by l_linenumber order by l_linenumber) as rn
|FROM lineitem
|)
|SELECT * FROM t WHERE rn = 1
|""".stripMargin
) {}
}

test("collect_list / collect_set") {
withTable("t") {
val data = Seq(
Expand Down

0 comments on commit b1bd9e2

Please sign in to comment.