Skip to content

Commit

Permalink
Add unit test for avg as window function
Browse files Browse the repository at this point in the history
  • Loading branch information
timsaucer committed Aug 23, 2024
1 parent ea0d289 commit c77af1b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion python/datafusion/tests/test_dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ def test_distinct():
.build(),
[-1, -1, 4],
),
# TODO update once upstream merges https://github.com/apache/datafusion-python/issues/833
# TODO update all aggregate functions as windows once upstream merges https://github.com/apache/datafusion-python/issues/833
pytest.param(
"first_value",
f.window("first_value", [column("a")], order_by=[f.order_by(column("b"))]),
Expand All @@ -337,6 +337,11 @@ def test_distinct():
),
[None, 5, 5],
),
pytest.param(
"avg",
f.window("avg", [column("b")]),
[4.0, 4.5, 5.0],
),
]


Expand Down

0 comments on commit c77af1b

Please sign in to comment.