Skip to content

Commit d052b43

Browse files
committed
test(pyspark): specify expected failures for merge
1 parent 24d2b31 commit d052b43

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

ibis/backends/tests/errors.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,18 @@
5555
from pyspark.errors.exceptions.base import ParseException as PySparkParseException
5656
from pyspark.errors.exceptions.base import PySparkValueError
5757
from pyspark.errors.exceptions.base import PythonException as PySparkPythonException
58+
from pyspark.errors.exceptions.base import (
59+
UnsupportedOperationException as PySparkUnsupportedOperationException,
60+
)
5861
from pyspark.errors.exceptions.connect import (
5962
SparkConnectGrpcException as PySparkConnectGrpcException,
6063
)
6164
except ImportError:
6265
PySparkParseException = PySparkAnalysisException = PySparkArithmeticException = (
6366
PySparkPythonException
64-
) = PySparkConnectGrpcException = PySparkValueError = None
67+
) = PySparkUnsupportedOperationException = PySparkConnectGrpcException = (
68+
PySparkValueError
69+
) = None
6570

6671
try:
6772
from google.api_core.exceptions import BadRequest as GoogleBadRequest

ibis/backends/tests/test_client.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
PyAthenaDatabaseError,
3737
PyDruidProgrammingError,
3838
PyODBCProgrammingError,
39+
PySparkUnsupportedOperationException,
3940
SnowflakeProgrammingError,
4041
TrinoUserError,
4142
)
@@ -49,6 +50,7 @@
4950
pd = pytest.importorskip("pandas")
5051
pa = pytest.importorskip("pyarrow")
5152
ds = pytest.importorskip("pyarrow.dataset")
53+
pyspark = pytest.importorskip("pyspark")
5254

5355

5456
@pytest.fixture
@@ -656,6 +658,13 @@ def _emp(a, b, c, d):
656658

657659

658660
@pytest.mark.notimpl(["polars"], reason="`upsert` method not implemented")
661+
@pytest.mark.notyet(
662+
["pyspark"],
663+
raises=PySparkUnsupportedOperationException
664+
if vparse(pyspark.__version__) >= vparse("3.5")
665+
else Py4JJavaError,
666+
reason="MERGE INTO TABLE is not supported temporarily",
667+
)
659668
@pytest.mark.notyet(
660669
["trino"],
661670
raises=TrinoUserError,
@@ -679,6 +688,13 @@ def test_upsert_from_dataframe(
679688

680689

681690
@pytest.mark.notimpl(["polars"], reason="`upsert` method not implemented")
691+
@pytest.mark.notyet(
692+
["pyspark"],
693+
raises=PySparkUnsupportedOperationException
694+
if vparse(pyspark.__version__) >= vparse("3.5")
695+
else Py4JJavaError,
696+
reason="MERGE INTO TABLE is not supported temporarily",
697+
)
682698
@pytest.mark.notyet(
683699
["trino"],
684700
raises=TrinoUserError,

0 commit comments

Comments
 (0)