Skip to content

Commit b1ed9f6

Browse files
committed
fix: exception assertion
1 parent ace3529 commit b1ed9f6

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

ibis/backends/sql/compilers/pyspark.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,10 +243,10 @@ def visit_CountDistinctStar(self, op, *, arg, where):
243243
]
244244
return self.f.count(sge.Distinct(expressions=cols))
245245

246-
def visit_FirstValue(self, op, *, arg):
246+
def visit_FirstValue(self, op, *, arg, include_null):
247247
return sge.IgnoreNulls(this=self.f.first(arg))
248248

249-
def visit_LastValue(self, op, *, arg):
249+
def visit_LastValue(self, op, *, arg, include_null):
250250
return sge.IgnoreNulls(this=self.f.last(arg))
251251

252252
def visit_First(self, op, *, arg, where, order_by, include_null):

ibis/backends/tests/test_window.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1116,27 +1116,33 @@ def test_first_last(backend):
11161116
"bigquery",
11171117
"oracle",
11181118
"snowflake",
1119-
"exasol",
11201119
"databricks",
11211120
"pyspark",
11221121
],
11231122
raises=AssertionError,
11241123
)
1124+
@pytest.mark.notyet(
1125+
["polars"],
1126+
raises=com.OperationNotDefinedError,
1127+
)
1128+
@pytest.mark.notyet(
1129+
["flink"],
1130+
raises=NotImplementedError,
1131+
)
11251132
@pytest.mark.notyet(
11261133
[
11271134
"mysql",
11281135
"sqlite",
11291136
"postgres",
11301137
"datafusion",
1131-
"polars",
11321138
"druid",
11331139
"athena",
11341140
"impala",
1135-
"flink",
11361141
"mssql",
11371142
"trino",
1143+
"exasol",
11381144
],
1139-
raises=AssertionError,
1145+
raises=Exception,
11401146
)
11411147
def test_first_last_include_nulls(backend):
11421148
t = ibis.memtable({"a": (2, 2, 1, 1), "b": (None, 3, 5, None), "c": list(range(4))})

0 commit comments

Comments
 (0)