From 09668c76b421b3424abdc7ac46719a25e40cf6a6 Mon Sep 17 00:00:00 2001 From: Nick Crews Date: Wed, 13 Mar 2024 13:08:03 -0800 Subject: [PATCH] test: add xfail test for duckdb map NULL bug --- ibis/backends/tests/test_map.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ibis/backends/tests/test_map.py b/ibis/backends/tests/test_map.py index e9b4e12b7e5c6..53d48bb8d06a6 100644 --- a/ibis/backends/tests/test_map.py +++ b/ibis/backends/tests/test_map.py @@ -1,5 +1,6 @@ from __future__ import annotations +import duckdb import numpy as np import pandas as pd import pandas.testing as tm @@ -11,6 +12,7 @@ import ibis.common.exceptions as exc import ibis.expr.datatypes as dt from ibis.backends.tests.errors import PsycoPg2InternalError, Py4JJavaError +from ibis.expr import operations as ops pytestmark = [ pytest.mark.never( @@ -42,6 +44,16 @@ def test_map_nulls(con, kv): assert con.execute(m) is None +@pytest.mark.xfail( + raises=duckdb.BinderException, + reason="https://github.com/ibis-project/ibis/issues/8632", +) +def test_map_null_workaround_xfail(): + null = ibis.literal(None, type="array") + m = ops.Map(null, [1, 2]).to_expr() + assert ibis.duckdb.connect().execute(m) is None + + @pytest.mark.notimpl(["pandas", "dask"]) def test_map_table(backend): table = backend.map