Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update dependency datafusion to v38 #9278

Merged
merged 3 commits into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ibis/backends/datafusion/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,8 +503,8 @@
)

delta_table = DeltaTable(source_table, **kwargs)

return self.register(delta_table.to_pyarrow_dataset(), table_name=table_name)
self.con.register_dataset(table_name, delta_table.to_pyarrow_dataset())
return self.table(table_name)

Check warning on line 507 in ibis/backends/datafusion/__init__.py

View check run for this annotation

Codecov / codecov/patch

ibis/backends/datafusion/__init__.py#L506-L507

Added lines #L506 - L507 were not covered by tests

def to_pyarrow_batches(
self,
Expand Down
7 changes: 6 additions & 1 deletion ibis/backends/datafusion/tests/test_udf.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

import pandas.testing as tm
import pytest
from packaging.version import parse as vparse

import ibis.expr.datatypes as dt
import ibis.expr.types as ir
from ibis import udf
from ibis.legacy.udf.vectorized import elementwise, reduction

pytest.importorskip("datafusion")
datafusion = pytest.importorskip("datafusion")
pc = pytest.importorskip("pyarrow.compute")

with pytest.warns(FutureWarning, match="v9.0"):
Expand Down Expand Up @@ -68,6 +69,10 @@ def median(a: float) -> float:
assert result == con.tables.batting.G.execute().median()


@pytest.mark.xfail(
condition=vparse(datafusion.__version__) == vparse("38.0.1"),
reason="internal error about MEDIAN(G) naming",
)
def test_builtin_agg_udf_filtered(con):
@udf.agg.builtin
def median(a: float, where: bool = True) -> float:
Expand Down
5 changes: 5 additions & 0 deletions ibis/backends/tests/test_aggregation.py
Original file line number Diff line number Diff line change
Expand Up @@ -892,6 +892,11 @@ def test_quantile(
raises=PsycoPg2InternalError,
reason="function covar_pop(integer, integer) does not exist",
),
pytest.mark.xfail_version(
datafusion=["datafusion==38.0.1"],
reason="datafusion FILTER syntax seems broken",
strict=False, # passes with no filter condition
),
],
),
param(
Expand Down
3 changes: 3 additions & 0 deletions ibis/backends/tests/test_generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1282,6 +1282,9 @@ def test_pivot_longer(backend):
assert len(res.execute()) == len(expected)


@pytest.mark.xfail_version(
datafusion=["datafusion==38.0.1"], reason="internal error about MEDIAN(G) naming"
)
def test_pivot_wider(backend):
diamonds = backend.diamonds
expr = (
Expand Down
14 changes: 7 additions & 7 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ dask = { version = ">=2022.9.1,<2024.3.0", optional = true, extras = [
"array",
"dataframe",
] }
datafusion = { version = ">=0.6,<38", optional = true }
datafusion = { version = ">=0.6,<39", optional = true }
db-dtypes = { version = ">=0.3,<2", optional = true }
deltalake = { version = ">=0.9.0,<1", optional = true }
duckdb = { version = ">=0.8.1,<1", optional = true }
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ crashtest==0.4.1 ; python_version >= "3.10" and python_version < "4.0"
cryptography==42.0.7 ; python_version >= "3.10" and python_version < "4.0"
cycler==0.12.1 ; python_version >= "3.10" and python_version < "3.13"
dask[array,dataframe]==2024.2.1 ; python_version >= "3.10" and python_version < "4.0"
datafusion==37.1.0 ; python_version >= "3.10" and python_version < "4.0"
datafusion==38.0.1 ; python_version >= "3.10" and python_version < "4.0"
db-dtypes==1.2.0 ; python_version >= "3.10" and python_version < "4.0"
debugpy==1.8.1 ; python_version >= "3.10" and python_version < "3.13"
decorator==5.1.1 ; python_version >= "3.10" and python_version < "4.0"
Expand Down
Loading