Skip to content

Commit c015111

Browse files
committed
chore: add test
1 parent f32c35d commit c015111

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

ibis/backends/tests/test_aggregation.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -659,6 +659,23 @@ def test_first_last_ordered(alltypes, method, filtered, include_null):
659659
assert res == sol
660660

661661

662+
@pytest.mark.notimpl(
663+
["clickhouse", "exasol", "flink", "pyspark", "sqlite", "databricks"],
664+
raises=com.UnsupportedOperationError,
665+
)
666+
@pytest.mark.notimpl(
667+
["druid", "impala", "mssql", "mysql", "oracle"],
668+
raises=com.OperationNotDefinedError,
669+
)
670+
@pytest.mark.parametrize("method", ["first", "last"])
671+
def test_first_last_ordered_in_mutate(alltypes, method):
672+
sol = 0 if method == "last" else 9
673+
expr = alltypes.mutate(
674+
new=getattr(alltypes.int_col, method)(order_by=_.int_col.desc())
675+
)
676+
assert expr.execute()["new"].eq(sol).all()
677+
678+
662679
@pytest.mark.notimpl(
663680
[
664681
"druid",

0 commit comments

Comments
 (0)