diff --git a/backends-velox/src/test/scala/org/apache/gluten/execution/WindowFunctionsValidateSuite.scala b/backends-velox/src/test/scala/org/apache/gluten/execution/WindowFunctionsValidateSuite.scala index 04d0d2c56b94..b0f38c74fe0b 100644 --- a/backends-velox/src/test/scala/org/apache/gluten/execution/WindowFunctionsValidateSuite.scala +++ b/backends-velox/src/test/scala/org/apache/gluten/execution/WindowFunctionsValidateSuite.scala @@ -19,6 +19,18 @@ package org.apache.gluten.execution class WindowFunctionsValidateSuite extends FunctionsValidateSuite { test("lag/lead window function with negative input offset") { + runQueryAndCompare( + "select l_suppkey,lag(l_orderkey, -2) over" + + " (partition by l_suppkey order by l_orderkey) from lineitem") { + checkGlutenOperatorMatch[WindowExecTransformer] + } + + runQueryAndCompare( + "select l_suppkey, lead(l_orderkey, -2) over" + + " (partition by l_suppkey order by l_orderkey) from lineitem") { + checkGlutenOperatorMatch[WindowExecTransformer] + } + runQueryAndCompare( "select lag(l_orderkey, -2) over" + " (partition by l_suppkey order by l_orderkey) from lineitem") { @@ -26,7 +38,7 @@ class WindowFunctionsValidateSuite extends FunctionsValidateSuite { } runQueryAndCompare( - "select lead(l_orderkey, -2) over" + + "select lag(l_orderkey, 2) over" + " (partition by l_suppkey order by l_orderkey) from lineitem") { checkGlutenOperatorMatch[WindowExecTransformer] }