Skip to content

Commit

Permalink
add ut
Browse files Browse the repository at this point in the history
  • Loading branch information
zml1206 committed Dec 8, 2023
1 parent a00649e commit f295898
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1389,6 +1389,17 @@ class DataFrameWindowFunctionsSuite extends QueryTest
)
)

// Both RowFrame and RangeFrame exist
checkAnswer(
df.withColumn("sum_value1", sum("value")
.over(window.rowsBetween(Window.unboundedPreceding, Window.currentRow)))
.withColumn("sum_value2", sum("value")
.over(window.rangeBetween(Window.unboundedPreceding, Window.currentRow))).limit(1),
Seq(
Row("a", 4, "", 4, 8)
)
)

// Choose LimitPushDownThroughWindow instead of WindowGroupLimit if the
// window function is rank-like and Window partitionSpec is empty.
val existWindowGroupLimit =
Expand Down

0 comments on commit f295898

Please sign in to comment.