Skip to content

Commit 707eef6

Browse files
committed
Add unit test for avg as window function
1 parent a9eaf47 commit 707eef6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

python/datafusion/tests/test_dataframe.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ def test_distinct():
317317
.build(),
318318
[-1, -1, 4],
319319
),
320-
# TODO update once upstream merges https://github.com/apache/datafusion-python/issues/833
320+
# TODO update all aggregate functions as windows once upstream merges https://github.com/apache/datafusion-python/issues/833
321321
pytest.param(
322322
"first_value",
323323
f.window("first_value", [column("a")], order_by=[f.order_by(column("b"))]),
@@ -337,6 +337,11 @@ def test_distinct():
337337
),
338338
[None, 5, 5],
339339
),
340+
pytest.param(
341+
"avg",
342+
f.window("avg", [column("b")]),
343+
[4.0, 4.5, 5.0],
344+
),
340345
]
341346

342347

0 commit comments

Comments
 (0)