From b1bd9e29fac484209283bef70871126f9d02c50d Mon Sep 17 00:00:00 2001 From: Qian Sun Date: Tue, 3 Sep 2024 02:47:32 +0000 Subject: [PATCH] validate 'Number of sorting keys must be greater than zero' --- .../execution/VeloxWindowExpressionSuite.scala | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/backends-velox/src/test/scala/org/apache/gluten/execution/VeloxWindowExpressionSuite.scala b/backends-velox/src/test/scala/org/apache/gluten/execution/VeloxWindowExpressionSuite.scala index 03b295f4983f..7af17c4cd151 100644 --- a/backends-velox/src/test/scala/org/apache/gluten/execution/VeloxWindowExpressionSuite.scala +++ b/backends-velox/src/test/scala/org/apache/gluten/execution/VeloxWindowExpressionSuite.scala @@ -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(