Skip to content

Commit

Permalink
fix(datafusion): handle NULLs in array flatten
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud authored and jcrist committed Sep 3, 2024
1 parent 9ee910d commit ecc199f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 3 additions & 0 deletions ibis/backends/sql/compilers/datafusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,5 +499,8 @@ def visit_GroupConcat(self, op, *, arg, sep, where, order_by):
op, arg=arg, sep=sep, where=where, order_by=order_by
)

def visit_ArrayFlatten(self, op, *, arg):
return self.if_(arg.is_(NULL), NULL, self.f.flatten(arg))


compiler = DataFusionCompiler()
2 changes: 0 additions & 2 deletions ibis/backends/tests/test_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -1033,7 +1033,6 @@ def flatten_data():
reason="Arrays are never nullable",
raises=AssertionError,
),
pytest.mark.notimpl(["datafusion"], raises=AssertionError),
],
),
param(
Expand All @@ -1051,7 +1050,6 @@ def flatten_data():
raises=TypeError,
reason="comparison of nested arrays doesn't work in pandas testing module",
),
pytest.mark.notimpl(["datafusion"], raises=AssertionError),
],
),
],
Expand Down

0 comments on commit ecc199f

Please sign in to comment.