Skip to content

Commit

Permalink
add ut
Browse files Browse the repository at this point in the history
  • Loading branch information
kecookier committed Sep 9, 2024
1 parent 5426936 commit 171b7a4
Showing 1 changed file with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,26 @@ 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") {
checkGlutenOperatorMatch[WindowExecTransformer]
}

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]
}
Expand Down

0 comments on commit 171b7a4

Please sign in to comment.