From b9fd61becc228f78e9bacc2b81faedbaf9067e90 Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Fri, 16 Feb 2024 08:02:43 -0500 Subject: [PATCH 1/8] test(duckdb): work with 0.10.0 --- ibis/backends/duckdb/tests/test_register.py | 38 +++++++- ibis/backends/tests/errors.py | 10 ++- ibis/backends/tests/test_numeric.py | 37 +++++++- ibis/backends/tests/test_temporal.py | 85 ++++++------------ ibis/backends/tests/test_window.py | 5 +- ibis/expr/types/generic.py | 40 ++++----- ibis/expr/types/numeric.py | 6 +- ibis/expr/types/relations.py | 96 ++++++++++----------- poetry.lock | 90 ++++++++++--------- 9 files changed, 221 insertions(+), 186 deletions(-) diff --git a/ibis/backends/duckdb/tests/test_register.py b/ibis/backends/duckdb/tests/test_register.py index eec6a6520334..87109b28b8cd 100644 --- a/ibis/backends/duckdb/tests/test_register.py +++ b/ibis/backends/duckdb/tests/test_register.py @@ -11,6 +11,7 @@ import pandas.testing as tm import pyarrow as pa import pytest +from pytest import param import ibis import ibis.expr.datatypes as dt @@ -106,7 +107,16 @@ def test_read_geo_to_geopandas(con, data_dir, gpd): assert isinstance(gdf, gpd.GeoDataFrame) -def test_read_geo_from_url(con, monkeypatch): +@pytest.mark.xfail( + LINUX and SANDBOXED, + reason="nix on linux cannot download duckdb extensions due to sandboxing", + raises=duckdb.IOException, +) +def test_read_geo_from_url(monkeypatch): + con = ibis.duckdb.connect() + + con.load_extension("httpfs") + loaded_exts = [] monkeypatch.setattr(con, "_load_extensions", lambda x, **_: loaded_exts.extend(x)) @@ -422,13 +432,33 @@ def test_csv_with_slash_n_null(con, tmp_path): @pytest.mark.xfail( - LINUX and SANDBOXED, - reason=("nix can't hit GCS because it is sandboxed."), + LINUX and SANDBOXED, reason="nix can't hit GCS because it is sandboxed." +) +@pytest.mark.parametrize( + "extensions", + [ + [], + param( + ["httpfs"], + marks=[ + pytest.mark.xfail( + duckdb.__version__ == "0.10.0", + reason="https://github.com/duckdb/duckdb/issues/10698", + raises=duckdb.HTTPException, + ) + ], + ), + ], ) -def test_register_filesystem_gcs(con): +def test_register_filesystem_gcs(extensions): fsspec = pytest.importorskip("fsspec") pytest.importorskip("gcsfs") + con = ibis.duckdb.connect() + + for ext in extensions: + con.load_extension(ext) + gcs = fsspec.filesystem("gcs") con.register_filesystem(gcs) diff --git a/ibis/backends/tests/errors.py b/ibis/backends/tests/errors.py index fad0bb02b701..365396d0dff0 100644 --- a/ibis/backends/tests/errors.py +++ b/ibis/backends/tests/errors.py @@ -1,14 +1,20 @@ from __future__ import annotations try: + from duckdb import BinderException as DuckDBBinderException from duckdb import ConversionException as DuckDBConversionException from duckdb import InvalidInputException as DuckDBInvalidInputException from duckdb import NotImplementedException as DuckDBNotImplementedException + from duckdb import OutOfRangeException as DuckDBOutOfRangeException from duckdb import ParserException as DuckDBParserException except ImportError: - DuckDBConversionException = DuckDBInvalidInputException = DuckDBParserException = ( + DuckDBConversionException = ( + DuckDBInvalidInputException + ) = ( + DuckDBParserException + ) = ( DuckDBNotImplementedException - ) = None + ) = DuckDBBinderException = DuckDBOutOfRangeException = None try: from clickhouse_connect.driver.exceptions import ( diff --git a/ibis/backends/tests/test_numeric.py b/ibis/backends/tests/test_numeric.py index fc8ab2338830..b299029824fa 100644 --- a/ibis/backends/tests/test_numeric.py +++ b/ibis/backends/tests/test_numeric.py @@ -17,6 +17,7 @@ from ibis import literal as L from ibis.backends.tests.errors import ( ArrowNotImplementedError, + DuckDBOutOfRangeException, DuckDBParserException, ExaQueryError, GoogleBadRequest, @@ -825,18 +826,46 @@ def test_trig_functions_literals(con, expr, expected): param(_.dc.acos(), np.arccos, id="acos"), param(_.dc.asin(), np.arcsin, id="asin"), param(_.dc.atan(), np.arctan, id="atan"), - param(_.dc.atan2(_.dc), lambda c: np.arctan2(c, c), id="atan2"), + param( + _.dc.atan2(_.dc), + lambda c: np.arctan2(c, c), + id="atan2", + marks=[ + pytest.mark.notyet( + ["mssql", "exasol"], raises=(PyODBCProgrammingError, ExaQueryError) + ) + ], + ), param(_.dc.cos(), np.cos, id="cos"), - param(_.dc.cot(), lambda c: 1.0 / np.tan(c), id="cot"), param(_.dc.sin(), np.sin, id="sin"), param(_.dc.tan(), np.tan, id="tan"), ], ) def test_trig_functions_columns(backend, expr, alltypes, df, expected_fn): dc_max = df.double_col.max() - expr = alltypes.mutate(dc=(_.double_col / dc_max).nullif(0)).select(tmp=expr) + expr = alltypes.mutate(dc=_.double_col / dc_max).select(tmp=expr) + result = expr.tmp.to_pandas() + expected = expected_fn(df.double_col / dc_max).rename("tmp") + backend.assert_series_equal(result, expected) + + +@pytest.mark.notyet( + ["mssql", "mysql", "duckdb", "exasol"], + raises=( + PyODBCProgrammingError, + MySQLOperationalError, + DuckDBOutOfRangeException, + ExaQueryError, + ), +) +@pytest.mark.broken( + ["sqlite", "impala"], raises=AssertionError, reason="behavior doesn't match numpy" +) +def test_cotangent(backend, alltypes, df): + dc_max = df.double_col.max() + expr = alltypes.select(tmp=(_.double_col / dc_max).cot()) result = expr.tmp.to_pandas() - expected = expected_fn((df.double_col / dc_max).replace(0.0, np.nan)).rename("tmp") + expected = 1.0 / np.tan(df.double_col / dc_max).rename("tmp") backend.assert_series_equal(result, expected) diff --git a/ibis/backends/tests/test_temporal.py b/ibis/backends/tests/test_temporal.py index 1954bb5f882f..ab235e6b66a4 100644 --- a/ibis/backends/tests/test_temporal.py +++ b/ibis/backends/tests/test_temporal.py @@ -20,6 +20,7 @@ from ibis.backends.tests.errors import ( ArrowInvalid, ClickHouseDatabaseError, + DuckDBBinderException, DuckDBInvalidInputException, ExaQueryError, GoogleBadRequest, @@ -1131,69 +1132,33 @@ def test_timestamp_comparison_filter(backend, con, alltypes, df, func_name): backend.assert_frame_equal(result, expected) +no_mixed_timestamp_comparisons = [ + pytest.mark.notimpl( + ["dask"], + raises=ValueError, + reason="Metadata inference failed in `gt`.", + ), + pytest.mark.notimpl( + ["pandas"], + raises=TypeError, + reason="Invalid comparison between dtype=datetime64[ns, UTC] and datetime", + ), + pytest.mark.never( + ["duckdb"], + raises=DuckDBBinderException, + # perhaps we should consider disallowing this in ibis as well + reason="DuckDB doesn't allow comparing timestamp with and without timezones", + ), +] + + @pytest.mark.parametrize( "func_name", [ - param( - "gt", - marks=[ - pytest.mark.notimpl( - ["dask"], - raises=ValueError, - reason="Metadata inference failed in `gt`.", - ), - pytest.mark.notimpl( - ["pandas"], - raises=TypeError, - reason="Invalid comparison between dtype=datetime64[ns, UTC] and datetime", - ), - ], - ), - param( - "ge", - marks=[ - pytest.mark.notimpl( - ["dask"], - raises=ValueError, - reason="Metadata inference failed in `ge`.", - ), - pytest.mark.notimpl( - ["pandas"], - raises=TypeError, - reason="Invalid comparison between dtype=datetime64[ns, UTC] and datetime", - ), - ], - ), - param( - "lt", - marks=[ - pytest.mark.notimpl( - ["dask"], - raises=ValueError, - reason="Metadata inference failed in `lt`.", - ), - pytest.mark.notimpl( - ["pandas"], - raises=TypeError, - reason="Invalid comparison between dtype=datetime64[ns, UTC] and datetime", - ), - ], - ), - param( - "le", - marks=[ - pytest.mark.notimpl( - ["dask"], - raises=ValueError, - reason="Metadata inference failed in `le`.", - ), - pytest.mark.notimpl( - ["pandas"], - raises=TypeError, - reason="Invalid comparison between dtype=datetime64[ns, UTC] and datetime", - ), - ], - ), + param("gt", marks=no_mixed_timestamp_comparisons), + param("ge", marks=no_mixed_timestamp_comparisons), + param("lt", marks=no_mixed_timestamp_comparisons), + param("le", marks=no_mixed_timestamp_comparisons), "eq", "ne", ], diff --git a/ibis/backends/tests/test_window.py b/ibis/backends/tests/test_window.py index 3765dd8642f6..10b845f961a1 100644 --- a/ibis/backends/tests/test_window.py +++ b/ibis/backends/tests/test_window.py @@ -1181,7 +1181,6 @@ def test_range_expression_bounds(backend): raises=PsycoPg2InternalError, reason="Feature is not yet implemented: Unrecognized window function: percent_rank", ) -@pytest.mark.broken(["dask"], reason="different result ordering", raises=AssertionError) def test_rank_followed_by_over_call_merge_frames(backend, alltypes, df): # GH #7631 t = alltypes @@ -1197,7 +1196,9 @@ def test_rank_followed_by_over_call_merge_frames(backend, alltypes, df): .rename(expr.get_name()) ) - backend.assert_series_equal(result, expected) + backend.assert_series_equal( + result.value_counts().sort_index(), expected.value_counts().sort_index() + ) @pytest.mark.notyet( diff --git a/ibis/expr/types/generic.py b/ibis/expr/types/generic.py index 0c1dccfadc9f..9db9d2fdb6cf 100644 --- a/ibis/expr/types/generic.py +++ b/ibis/expr/types/generic.py @@ -1223,21 +1223,19 @@ def as_scalar(self): Examples -------- >>> import ibis - >>> >>> ibis.options.interactive = True - >>> >>> t = ibis.examples.penguins.fetch() >>> max_gentoo_weight = t.filter(t.species == "Gentoo").body_mass_g.max() >>> light_penguins = t.filter(t.body_mass_g < max_gentoo_weight / 2) - >>> light_penguins.group_by("species").count() - ┏━━━━━━━━━━━┳━━━━━━━━━━━━━┓ - ┃ species ┃ CountStar() ┃ - ┡━━━━━━━━━━━╇━━━━━━━━━━━━━┩ - │ string │ int64 │ - ├───────────┼─────────────┤ - │ Adelie │ 15 │ - │ Chinstrap │ 2 │ - └───────────┴─────────────┘ + >>> light_penguins.species.value_counts().order_by("species") + ┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓ + ┃ species ┃ species_count ┃ + ┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩ + │ string │ int64 │ + ├───────────┼───────────────┤ + │ Adelie │ 15 │ + │ Chinstrap │ 2 │ + └───────────┴───────────────┘ """ parents = self.op().relations if parents: @@ -1361,21 +1359,19 @@ def as_scalar(self) -> Scalar: Examples -------- >>> import ibis - >>> >>> ibis.options.interactive = True - >>> >>> t = ibis.examples.penguins.fetch() >>> heavy_gentoo = t.filter(t.species == "Gentoo", t.body_mass_g > 6200) >>> from_that_island = t.filter(t.island == heavy_gentoo.island.as_scalar()) - >>> from_that_island.group_by("species").count() - ┏━━━━━━━━━┳━━━━━━━━━━━━━┓ - ┃ species ┃ CountStar() ┃ - ┡━━━━━━━━━╇━━━━━━━━━━━━━┩ - │ string │ int64 │ - ├─────────┼─────────────┤ - │ Adelie │ 44 │ - │ Gentoo │ 124 │ - └─────────┴─────────────┘ + >>> from_that_island.species.value_counts().order_by("species") + ┏━━━━━━━━━┳━━━━━━━━━━━━━━━┓ + ┃ species ┃ species_count ┃ + ┡━━━━━━━━━╇━━━━━━━━━━━━━━━┩ + │ string │ int64 │ + ├─────────┼───────────────┤ + │ Adelie │ 44 │ + │ Gentoo │ 124 │ + └─────────┴───────────────┘ """ return self.as_table().as_scalar() diff --git a/ibis/expr/types/numeric.py b/ibis/expr/types/numeric.py index f26372ce516b..27802600a480 100644 --- a/ibis/expr/types/numeric.py +++ b/ibis/expr/types/numeric.py @@ -594,7 +594,7 @@ def cot(self) -> NumericValue: -------- >>> import ibis >>> ibis.options.interactive = True - >>> t = ibis.memtable({"values": [-1, 0, 1]}) + >>> t = ibis.memtable({"values": [-1, -2, 3]}) >>> t.values.cot() ┏━━━━━━━━━━━━━┓ ┃ Cot(values) ┃ @@ -602,8 +602,8 @@ def cot(self) -> NumericValue: │ float64 │ ├─────────────┤ │ -0.642093 │ - │ inf │ - │ 0.642093 │ + │ 0.457658 │ + │ -7.015253 │ └─────────────┘ """ return ops.Cot(self).to_expr() diff --git a/ibis/expr/types/relations.py b/ibis/expr/types/relations.py index 07c0cb60c420..9fb7e1a18c0c 100644 --- a/ibis/expr/types/relations.py +++ b/ibis/expr/types/relations.py @@ -307,21 +307,19 @@ def as_scalar(self) -> ir.ScalarExpr: Examples -------- >>> import ibis - >>> >>> ibis.options.interactive = True - >>> >>> t = ibis.examples.penguins.fetch() >>> heavy_gentoo = t.filter(t.species == "Gentoo", t.body_mass_g > 6200) >>> from_that_island = t.filter(t.island == heavy_gentoo.select("island").as_scalar()) - >>> from_that_island.group_by("species").count() - ┏━━━━━━━━━┳━━━━━━━━━━━━━┓ - ┃ species ┃ CountStar() ┃ - ┡━━━━━━━━━╇━━━━━━━━━━━━━┩ - │ string │ int64 │ - ├─────────┼─────────────┤ - │ Adelie │ 44 │ - │ Gentoo │ 124 │ - └─────────┴─────────────┘ + >>> from_that_island.species.value_counts().order_by("species") + ┏━━━━━━━━━┳━━━━━━━━━━━━━━━┓ + ┃ species ┃ species_count ┃ + ┡━━━━━━━━━╇━━━━━━━━━━━━━━━┩ + │ string │ int64 │ + ├─────────┼───────────────┤ + │ Adelie │ 44 │ + │ Gentoo │ 124 │ + └─────────┴───────────────┘ """ return ops.ScalarSubquery(self).to_expr() @@ -2985,18 +2983,18 @@ def join( sequence. Find all instances where a user both tagged and rated a movie: - >>> tags.join(ratings, ["userId", "movieId"]).head(5) - ┏━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━┓ - ┃ userId ┃ movieId ┃ tag ┃ timestamp ┃ rating ┃ - ┡━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━┩ - │ int64 │ int64 │ string │ int64 │ float64 │ - ├────────┼─────────┼─────────────────┼────────────┼─────────┤ - │ 2 │ 60756 │ will ferrell │ 1445714992 │ 5.0 │ - │ 2 │ 89774 │ Tom Hardy │ 1445715205 │ 5.0 │ - │ 2 │ 106782 │ Martin Scorsese │ 1445715056 │ 5.0 │ - │ 7 │ 48516 │ way too long │ 1169687325 │ 1.0 │ - │ 18 │ 431 │ mafia │ 1462138755 │ 4.0 │ - └────────┴─────────┴─────────────────┴────────────┴─────────┘ + >>> tags.join(ratings, ["userId", "movieId"]).head(5).order_by("userId") + ┏━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━┓ + ┃ userId ┃ movieId ┃ tag ┃ timestamp ┃ rating ┃ + ┡━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━┩ + │ int64 │ int64 │ string │ int64 │ float64 │ + ├────────┼─────────┼────────────────┼────────────┼─────────┤ + │ 62 │ 2 │ Robin Williams │ 1528843907 │ 4.0 │ + │ 62 │ 110 │ sword fight │ 1528152535 │ 4.5 │ + │ 62 │ 410 │ gothic │ 1525636609 │ 4.5 │ + │ 62 │ 2023 │ mafia │ 1525636733 │ 5.0 │ + │ 62 │ 2124 │ quirky │ 1525636846 │ 5.0 │ + └────────┴─────────┴────────────────┴────────────┴─────────┘ To self-join a table with itself, you need to call `.view()` on one of the arguments so the two tables @@ -3021,17 +3019,17 @@ def join( ... movie_tags.movieId != view.movieId, ... (_.tag.lower(), lambda t: t.tag.lower()), ... ], - ... ).head() + ... ).head().order_by(("movieId", "movieId_right")) ┏━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┓ ┃ movieId ┃ tag ┃ movieId_right ┃ tag_right ┃ ┡━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━┩ │ int64 │ string │ int64 │ string │ ├─────────┼───────────────────┼───────────────┼───────────────────┤ - │ 60756 │ funny │ 1732 │ funny │ - │ 60756 │ Highly quotable │ 1732 │ Highly quotable │ - │ 89774 │ Tom Hardy │ 139385 │ tom hardy │ - │ 106782 │ drugs │ 1732 │ drugs │ - │ 106782 │ Leonardo DiCaprio │ 5989 │ Leonardo DiCaprio │ + │ 1732 │ funny │ 60756 │ funny │ + │ 1732 │ Highly quotable │ 60756 │ Highly quotable │ + │ 1732 │ drugs │ 106782 │ drugs │ + │ 5989 │ Leonardo DiCaprio │ 106782 │ Leonardo DiCaprio │ + │ 139385 │ tom hardy │ 89774 │ Tom Hardy │ └─────────┴───────────────────┴───────────────┴───────────────────┘ """ from ibis.expr.types.joins import Join @@ -3954,15 +3952,17 @@ def pivot_wider( │ A │ M │ 18 │ │ … │ … │ … │ └────────┴─────────┴────────┘ - >>> warpbreaks.pivot_wider(names_from="wool", values_from="breaks", values_agg="mean") + >>> warpbreaks.pivot_wider( + ... names_from="wool", values_from="breaks", values_agg="mean" + ... ).select("tension", "A", "B").order_by("tension") ┏━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━┓ ┃ tension ┃ A ┃ B ┃ ┡━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━┩ │ string │ float64 │ float64 │ ├─────────┼───────────┼───────────┤ + │ H │ 24.555556 │ 18.777778 │ │ L │ 44.555556 │ 28.222222 │ │ M │ 24.000000 │ 28.777778 │ - │ H │ 24.555556 │ 18.777778 │ └─────────┴───────────┴───────────┘ Passing `Deferred` objects to `values_agg` is supported @@ -3971,14 +3971,14 @@ def pivot_wider( ... names_from="tension", ... values_from="breaks", ... values_agg=_.sum(), - ... ).order_by("wool") + ... ).select("wool", "H", "L", "M").order_by(s.all()) ┏━━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┓ - ┃ wool ┃ L ┃ M ┃ H ┃ + ┃ wool ┃ H ┃ L ┃ M ┃ ┡━━━━━━━━╇━━━━━━━╇━━━━━━━╇━━━━━━━┩ │ string │ int64 │ int64 │ int64 │ ├────────┼───────┼───────┼───────┤ - │ A │ 401 │ 216 │ 221 │ - │ B │ 254 │ 259 │ 169 │ + │ A │ 221 │ 401 │ 216 │ + │ B │ 169 │ 254 │ 259 │ └────────┴───────┴───────┴───────┘ Use a custom aggregate function @@ -3987,15 +3987,15 @@ def pivot_wider( ... names_from="wool", ... values_from="breaks", ... values_agg=lambda col: col.std() / col.mean(), - ... ) + ... ).select("tension", "A", "B").order_by("tension") ┏━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━┓ ┃ tension ┃ A ┃ B ┃ ┡━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━┩ │ string │ float64 │ float64 │ ├─────────┼──────────┼──────────┤ + │ H │ 0.418344 │ 0.260590 │ │ L │ 0.406183 │ 0.349325 │ │ M │ 0.360844 │ 0.327719 │ - │ H │ 0.418344 │ 0.260590 │ └─────────┴──────────┴──────────┘ Generate some random data, setting the random seed for reproducibility @@ -4016,22 +4016,22 @@ def pivot_wider( ... ] ... ) >>> production = raw.filter(((_.product == "A") & (_.country == "AI")) | (_.product == "B")) - >>> production + >>> production.order_by(s.all()) ┏━━━━━━━━━┳━━━━━━━━━┳━━━━━━━┳━━━━━━━━━━━━┓ ┃ product ┃ country ┃ year ┃ production ┃ ┡━━━━━━━━━╇━━━━━━━━━╇━━━━━━━╇━━━━━━━━━━━━┩ │ string │ string │ int64 │ float64 │ ├─────────┼─────────┼───────┼────────────┤ - │ B │ AI │ 2000 │ 0.477010 │ - │ B │ AI │ 2001 │ 0.865310 │ - │ B │ AI │ 2002 │ 0.260492 │ - │ B │ AI │ 2003 │ 0.805028 │ - │ B │ AI │ 2004 │ 0.548699 │ - │ B │ AI │ 2005 │ 0.014042 │ - │ B │ AI │ 2006 │ 0.719705 │ - │ B │ AI │ 2007 │ 0.398824 │ - │ B │ AI │ 2008 │ 0.824845 │ - │ B │ AI │ 2009 │ 0.668153 │ + │ A │ AI │ 2000 │ 0.844422 │ + │ A │ AI │ 2001 │ 0.757954 │ + │ A │ AI │ 2002 │ 0.420572 │ + │ A │ AI │ 2003 │ 0.258917 │ + │ A │ AI │ 2004 │ 0.511275 │ + │ A │ AI │ 2005 │ 0.404934 │ + │ A │ AI │ 2006 │ 0.783799 │ + │ A │ AI │ 2007 │ 0.303313 │ + │ A │ AI │ 2008 │ 0.476597 │ + │ A │ AI │ 2009 │ 0.583382 │ │ … │ … │ … │ … │ └─────────┴─────────┴───────┴────────────┘ diff --git a/poetry.lock b/poetry.lock index 73944c05817d..77a4c1b805c5 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1380,50 +1380,58 @@ zict = ">=3.0.0" [[package]] name = "duckdb" -version = "0.9.2" -description = "DuckDB embedded database" +version = "0.10.0" +description = "DuckDB in-process database" optional = false python-versions = ">=3.7.0" files = [ - {file = "duckdb-0.9.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:aadcea5160c586704c03a8a796c06a8afffbefefb1986601104a60cb0bfdb5ab"}, - {file = "duckdb-0.9.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:08215f17147ed83cbec972175d9882387366de2ed36c21cbe4add04b39a5bcb4"}, - {file = "duckdb-0.9.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ee6c2a8aba6850abef5e1be9dbc04b8e72a5b2c2b67f77892317a21fae868fe7"}, - {file = "duckdb-0.9.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1ff49f3da9399900fd58b5acd0bb8bfad22c5147584ad2427a78d937e11ec9d0"}, - {file = "duckdb-0.9.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd5ac5baf8597efd2bfa75f984654afcabcd698342d59b0e265a0bc6f267b3f0"}, - {file = "duckdb-0.9.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:81c6df905589a1023a27e9712edb5b724566587ef280a0c66a7ec07c8083623b"}, - {file = "duckdb-0.9.2-cp310-cp310-win32.whl", hash = "sha256:a298cd1d821c81d0dec8a60878c4b38c1adea04a9675fb6306c8f9083bbf314d"}, - {file = "duckdb-0.9.2-cp310-cp310-win_amd64.whl", hash = "sha256:492a69cd60b6cb4f671b51893884cdc5efc4c3b2eb76057a007d2a2295427173"}, - {file = "duckdb-0.9.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:061a9ea809811d6e3025c5de31bc40e0302cfb08c08feefa574a6491e882e7e8"}, - {file = "duckdb-0.9.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:a43f93be768af39f604b7b9b48891f9177c9282a408051209101ff80f7450d8f"}, - {file = "duckdb-0.9.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ac29c8c8f56fff5a681f7bf61711ccb9325c5329e64f23cb7ff31781d7b50773"}, - {file = "duckdb-0.9.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b14d98d26bab139114f62ade81350a5342f60a168d94b27ed2c706838f949eda"}, - {file = "duckdb-0.9.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:796a995299878913e765b28cc2b14c8e44fae2f54ab41a9ee668c18449f5f833"}, - {file = "duckdb-0.9.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:6cb64ccfb72c11ec9c41b3cb6181b6fd33deccceda530e94e1c362af5f810ba1"}, - {file = "duckdb-0.9.2-cp311-cp311-win32.whl", hash = "sha256:930740cb7b2cd9e79946e1d3a8f66e15dc5849d4eaeff75c8788d0983b9256a5"}, - {file = "duckdb-0.9.2-cp311-cp311-win_amd64.whl", hash = "sha256:c28f13c45006fd525001b2011cdf91fa216530e9751779651e66edc0e446be50"}, - {file = "duckdb-0.9.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:fbce7bbcb4ba7d99fcec84cec08db40bc0dd9342c6c11930ce708817741faeeb"}, - {file = "duckdb-0.9.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:15a82109a9e69b1891f0999749f9e3265f550032470f51432f944a37cfdc908b"}, - {file = "duckdb-0.9.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9490fb9a35eb74af40db5569d90df8a04a6f09ed9a8c9caa024998c40e2506aa"}, - {file = "duckdb-0.9.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:696d5c6dee86c1a491ea15b74aafe34ad2b62dcd46ad7e03b1d00111ca1a8c68"}, - {file = "duckdb-0.9.2-cp37-cp37m-win32.whl", hash = "sha256:4f0935300bdf8b7631ddfc838f36a858c1323696d8c8a2cecbd416bddf6b0631"}, - {file = "duckdb-0.9.2-cp37-cp37m-win_amd64.whl", hash = "sha256:0aab900f7510e4d2613263865570203ddfa2631858c7eb8cbed091af6ceb597f"}, - {file = "duckdb-0.9.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:7d8130ed6a0c9421b135d0743705ea95b9a745852977717504e45722c112bf7a"}, - {file = "duckdb-0.9.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:974e5de0294f88a1a837378f1f83330395801e9246f4e88ed3bfc8ada65dcbee"}, - {file = "duckdb-0.9.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:4fbc297b602ef17e579bb3190c94d19c5002422b55814421a0fc11299c0c1100"}, - {file = "duckdb-0.9.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1dd58a0d84a424924a35b3772419f8cd78a01c626be3147e4934d7a035a8ad68"}, - {file = "duckdb-0.9.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:11a1194a582c80dfb57565daa06141727e415ff5d17e022dc5f31888a5423d33"}, - {file = "duckdb-0.9.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:be45d08541002a9338e568dca67ab4f20c0277f8f58a73dfc1435c5b4297c996"}, - {file = "duckdb-0.9.2-cp38-cp38-win32.whl", hash = "sha256:dd6f88aeb7fc0bfecaca633629ff5c986ac966fe3b7dcec0b2c48632fd550ba2"}, - {file = "duckdb-0.9.2-cp38-cp38-win_amd64.whl", hash = "sha256:28100c4a6a04e69aa0f4a6670a6d3d67a65f0337246a0c1a429f3f28f3c40b9a"}, - {file = "duckdb-0.9.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:7ae5bf0b6ad4278e46e933e51473b86b4b932dbc54ff097610e5b482dd125552"}, - {file = "duckdb-0.9.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:e5d0bb845a80aa48ed1fd1d2d285dd352e96dc97f8efced2a7429437ccd1fe1f"}, - {file = "duckdb-0.9.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4ce262d74a52500d10888110dfd6715989926ec936918c232dcbaddb78fc55b4"}, - {file = "duckdb-0.9.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6935240da090a7f7d2666f6d0a5e45ff85715244171ca4e6576060a7f4a1200e"}, - {file = "duckdb-0.9.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a5cfb93e73911696a98b9479299d19cfbc21dd05bb7ab11a923a903f86b4d06e"}, - {file = "duckdb-0.9.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:64e3bc01751f31e7572d2716c3e8da8fe785f1cdc5be329100818d223002213f"}, - {file = "duckdb-0.9.2-cp39-cp39-win32.whl", hash = "sha256:6e5b80f46487636368e31b61461940e3999986359a78660a50dfdd17dd72017c"}, - {file = "duckdb-0.9.2-cp39-cp39-win_amd64.whl", hash = "sha256:e6142a220180dbeea4f341708bd5f9501c5c962ce7ef47c1cadf5e8810b4cb13"}, - {file = "duckdb-0.9.2.tar.gz", hash = "sha256:3843afeab7c3fc4a4c0b53686a4cc1d9cdbdadcbb468d60fef910355ecafd447"}, + {file = "duckdb-0.10.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:bd0ffb3fddef0f72a150e4d76e10942a84a1a0447d10907df1621b90d6668060"}, + {file = "duckdb-0.10.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f3d709d5c7c1a12b5e10d0b05fa916c670cd2b50178e3696faa0cc16048a1745"}, + {file = "duckdb-0.10.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9114aa22ec5d591a20ce5184be90f49d8e5b5348ceaab21e102c54560d07a5f8"}, + {file = "duckdb-0.10.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:77a37877efadf39caf7cadde0f430fedf762751b9c54750c821e2f1316705a21"}, + {file = "duckdb-0.10.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:87cbc9e1d9c3fc9f14307bea757f99f15f46843c0ab13a6061354410824ed41f"}, + {file = "duckdb-0.10.0-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f0bfec79fed387201550517d325dff4fad2705020bc139d936cab08b9e845662"}, + {file = "duckdb-0.10.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:c5622134d2d9796b15e09de810e450859d4beb46d9b861357ec9ae40a61b775c"}, + {file = "duckdb-0.10.0-cp310-cp310-win_amd64.whl", hash = "sha256:089ee8e831ccaef1b73fc89c43b661567175eed0115454880bafed5e35cda702"}, + {file = "duckdb-0.10.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:a05af63747f1d7021995f0811c333dee7316cec3b06c0d3e4741b9bdb678dd21"}, + {file = "duckdb-0.10.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:072d6eba5d8a59e0069a8b5b4252fed8a21f9fe3f85a9129d186a39b3d0aea03"}, + {file = "duckdb-0.10.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a77b85668f59b919042832e4659538337f1c7f197123076c5311f1c9cf077df7"}, + {file = "duckdb-0.10.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:96a666f1d2da65d03199a977aec246920920a5ea1da76b70ae02bd4fb1ffc48c"}, + {file = "duckdb-0.10.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2ec76a4262b783628d26612d184834852d9c92fb203e91af789100c17e3d7173"}, + {file = "duckdb-0.10.0-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:009dd9d2cdbd3b061a9efbdfc79f2d1a8377bcf49f1e5f430138621f8c083a6c"}, + {file = "duckdb-0.10.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:878f06766088090dad4a2e5ee0081555242b2e8dcb29415ecc97e388cf0cf8d8"}, + {file = "duckdb-0.10.0-cp311-cp311-win_amd64.whl", hash = "sha256:713ff0a1fb63a6d60f454acf67f31656549fb5d63f21ac68314e4f522daa1a89"}, + {file = "duckdb-0.10.0-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:9c0ee450dfedfb52dd4957244e31820feef17228da31af6d052979450a80fd19"}, + {file = "duckdb-0.10.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:ff79b2ea9994398b545c0d10601cd73565fbd09f8951b3d8003c7c5c0cebc7cb"}, + {file = "duckdb-0.10.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6bdf1aa71b924ef651062e6b8ff9981ad85bec89598294af8a072062c5717340"}, + {file = "duckdb-0.10.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d0265bbc8216be3ced7b377ba8847128a3fc0ef99798a3c4557c1b88e3a01c23"}, + {file = "duckdb-0.10.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1d418a315a07707a693bd985274c0f8c4dd77015d9ef5d8d3da4cc1942fd82e0"}, + {file = "duckdb-0.10.0-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2828475a292e68c71855190b818aded6bce7328f79e38c04a0c75f8f1c0ceef0"}, + {file = "duckdb-0.10.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:c3aaeaae2eba97035c65f31ffdb18202c951337bf2b3d53d77ce1da8ae2ecf51"}, + {file = "duckdb-0.10.0-cp312-cp312-win_amd64.whl", hash = "sha256:c51790aaaea97d8e4a58a114c371ed8d2c4e1ca7cbf29e3bdab6d8ccfc5afc1e"}, + {file = "duckdb-0.10.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:8af1ae7cc77a12206b6c47ade191882cc8f49f750bb3e72bb86ac1d4fa89926a"}, + {file = "duckdb-0.10.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:aa4f7e8e8dc0e376aeb280b83f2584d0e25ec38985c27d19f3107b2edc4f4a97"}, + {file = "duckdb-0.10.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:28ae942a79fad913defa912b56483cd7827a4e7721f4ce4bc9025b746ecb3c89"}, + {file = "duckdb-0.10.0-cp37-cp37m-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:01b57802898091455ca2a32c1335aac1e398da77c99e8a96a1e5de09f6a0add9"}, + {file = "duckdb-0.10.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:52e1ad4a55fa153d320c367046b9500578192e01c6d04308ba8b540441736f2c"}, + {file = "duckdb-0.10.0-cp37-cp37m-win_amd64.whl", hash = "sha256:904c47d04095af745e989c853f0bfc0776913dfc40dfbd2da7afdbbb5f67fed0"}, + {file = "duckdb-0.10.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:184ae7ea5874f3b8fa51ab0f1519bdd088a0b78c32080ee272b1d137e2c8fd9c"}, + {file = "duckdb-0.10.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:bd33982ecc9bac727a032d6cedced9f19033cbad56647147408891eb51a6cb37"}, + {file = "duckdb-0.10.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:f59bf0949899105dd5f8864cb48139bfb78454a8c017b8258ba2b5e90acf7afc"}, + {file = "duckdb-0.10.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:395f3b18948001e35dceb48a4423d574e38656606d033eef375408b539e7b076"}, + {file = "duckdb-0.10.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9b8eb2b803be7ee1df70435c33b03a4598cdaf676cd67ad782b288dcff65d781"}, + {file = "duckdb-0.10.0-cp38-cp38-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:31b2ddd331801064326c8e3587a4db8a31d02aef11332c168f45b3bd92effb41"}, + {file = "duckdb-0.10.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:c8b89e76a041424b8c2026c5dc1f74b53fbbc6c6f650d563259885ab2e7d093d"}, + {file = "duckdb-0.10.0-cp38-cp38-win_amd64.whl", hash = "sha256:79084a82f16c0a54f6bfb7ded5600400c2daa90eb0d83337d81a56924eaee5d4"}, + {file = "duckdb-0.10.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:79799b3a270dcd9070f677ba510f1e66b112df3068425691bac97c5e278929c7"}, + {file = "duckdb-0.10.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:e8fc394bfe3434920cdbcfbdd0ac3ba40902faa1dbda088db0ba44003a45318a"}, + {file = "duckdb-0.10.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:c116605551b4abf5786243a59bcef02bd69cc51837d0c57cafaa68cdc428aa0c"}, + {file = "duckdb-0.10.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3191170c3b0a43b0c12644800326f5afdea00d5a4621d59dbbd0c1059139e140"}, + {file = "duckdb-0.10.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fee69a50eb93c72dc77e7ab1fabe0c38d21a52c5da44a86aa217081e38f9f1bd"}, + {file = "duckdb-0.10.0-cp39-cp39-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c5f449e87dacb16b0d145dbe65fa6fdb5a55b2b6911a46d74876e445dd395bac"}, + {file = "duckdb-0.10.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:4487d0df221b17ea4177ad08131bc606b35f25cfadf890987833055b9d10cdf6"}, + {file = "duckdb-0.10.0-cp39-cp39-win_amd64.whl", hash = "sha256:c099ae2ff8fe939fda62da81704f91e2f92ac45e48dc0e37c679c9d243d01e65"}, + {file = "duckdb-0.10.0.tar.gz", hash = "sha256:c02bcc128002aa79e3c9d89b9de25e062d1096a8793bc0d7932317b7977f6845"}, ] [[package]] From c6392d773c0b4038bad50b7588fa58081cfa1ada Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Wed, 21 Feb 2024 07:19:25 -0500 Subject: [PATCH 2/8] test(duckdb): use temp tables instead of create or replace --- ci/schema/duckdb.sql | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ci/schema/duckdb.sql b/ci/schema/duckdb.sql index 50a82bfdc403..6d732bf91799 100644 --- a/ci/schema/duckdb.sql +++ b/ci/schema/duckdb.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE TABLE array_types ( +CREATE TEMP TABLE array_types ( x BIGINT[], y TEXT[], z DOUBLE PRECISION[], @@ -16,7 +16,7 @@ INSERT INTO array_types VALUES ([4, NULL, NULL, 5], ['d', NULL, NULL, 'e'], [4.0, NULL, NULL, 5.0], 'c', 6.0, [[1, 2, 3]]); -CREATE OR REPLACE TABLE struct ( +CREATE TEMP TABLE struct ( abc STRUCT(a DOUBLE, b STRING, c BIGINT) ); @@ -29,7 +29,7 @@ INSERT INTO struct VALUES (NULL), ({'a': 3.0, 'b': 'orange', 'c': NULL}); -CREATE OR REPLACE TABLE json_t (js TEXT); +CREATE TEMP TABLE json_t (js TEXT); INSERT INTO json_t VALUES ('{"a": [1,2,3,4], "b": 1}'), @@ -39,7 +39,7 @@ INSERT INTO json_t VALUES ('[42,47,55]'), ('[]'); -CREATE OR REPLACE TABLE win (g TEXT, x BIGINT NOT NULL, y BIGINT); +CREATE TEMP TABLE win (g TEXT, x BIGINT NOT NULL, y BIGINT); INSERT INTO win VALUES ('a', 0, 3), ('a', 1, 2), @@ -47,7 +47,7 @@ INSERT INTO win VALUES ('a', 3, 1), ('a', 4, 1); -CREATE OR REPLACE TABLE map (idx BIGINT, kv MAP(STRING, BIGINT)); +CREATE TEMP TABLE map (idx BIGINT, kv MAP(STRING, BIGINT)); INSERT INTO map VALUES (1, MAP(['a', 'b', 'c'], [1, 2, 3])), (2, MAP(['d', 'e', 'f'], [4, 5, 6])); From 4490b79090404d46c39a4bd51a31f927d7332c83 Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Wed, 21 Feb 2024 07:25:44 -0500 Subject: [PATCH 3/8] ci(duckdb): try running serially --- .github/workflows/ibis-backends.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ibis-backends.yml b/.github/workflows/ibis-backends.yml index c5204edf4b31..5ef41e9bf8a9 100644 --- a/.github/workflows/ibis-backends.yml +++ b/.github/workflows/ibis-backends.yml @@ -57,6 +57,7 @@ jobs: backend: - name: duckdb title: DuckDB + serial: true extras: - duckdb - deltalake From 91535cf787a8f56cf1f5a9f90e86f2d02e353970 Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Wed, 21 Feb 2024 13:59:06 -0500 Subject: [PATCH 4/8] test: try without httpfs install --- ibis/backends/duckdb/tests/test_register.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/ibis/backends/duckdb/tests/test_register.py b/ibis/backends/duckdb/tests/test_register.py index 87109b28b8cd..68cb4831abad 100644 --- a/ibis/backends/duckdb/tests/test_register.py +++ b/ibis/backends/duckdb/tests/test_register.py @@ -115,8 +115,6 @@ def test_read_geo_to_geopandas(con, data_dir, gpd): def test_read_geo_from_url(monkeypatch): con = ibis.duckdb.connect() - con.load_extension("httpfs") - loaded_exts = [] monkeypatch.setattr(con, "_load_extensions", lambda x, **_: loaded_exts.extend(x)) From 0a1ff313ccba11a8907c241bdf08f4a277b65774 Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Wed, 21 Feb 2024 14:47:51 -0500 Subject: [PATCH 5/8] test: run on nix because no extensions are being downloaded --- ibis/backends/duckdb/tests/test_register.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ibis/backends/duckdb/tests/test_register.py b/ibis/backends/duckdb/tests/test_register.py index 68cb4831abad..9e1dd802124a 100644 --- a/ibis/backends/duckdb/tests/test_register.py +++ b/ibis/backends/duckdb/tests/test_register.py @@ -107,11 +107,6 @@ def test_read_geo_to_geopandas(con, data_dir, gpd): assert isinstance(gdf, gpd.GeoDataFrame) -@pytest.mark.xfail( - LINUX and SANDBOXED, - reason="nix on linux cannot download duckdb extensions due to sandboxing", - raises=duckdb.IOException, -) def test_read_geo_from_url(monkeypatch): con = ibis.duckdb.connect() From d45f53cb4215d36c5ae30229bc6bc29d5712c97c Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Sun, 3 Mar 2024 11:53:12 -0500 Subject: [PATCH 6/8] fixup! test: run on nix because no extensions are being downloaded --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 2fe0d3bb3c6c..0b8abba1ed52 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -49,7 +49,7 @@ decorator==5.1.1 ; python_version >= "3.9" and python_version < "4.0" deltalake==0.15.3 ; python_version >= "3.9" and python_version < "4.0" distlib==0.3.8 ; python_version >= "3.9" and python_version < "4.0" distributed==2024.2.1 ; python_version >= "3.10" and python_version < "3.13" -duckdb==0.9.2 ; python_version >= "3.9" and python_version < "4.0" +duckdb==0.10.0 ; python_version >= "3.9" and python_version < "4.0" dulwich==0.21.7 ; python_version >= "3.9" and python_version < "4.0" dunamai==1.19.2 ; python_version >= "3.9" and python_version < "4.0" exceptiongroup==1.2.0 ; python_version >= "3.9" and python_version < "3.11" From ae5623f5bb7184bc42435885a65be104aeb44c54 Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Sun, 3 Mar 2024 11:53:46 -0500 Subject: [PATCH 7/8] chore: reformat --- ibis/backends/tests/errors.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ibis/backends/tests/errors.py b/ibis/backends/tests/errors.py index 365396d0dff0..3613f097ad46 100644 --- a/ibis/backends/tests/errors.py +++ b/ibis/backends/tests/errors.py @@ -8,11 +8,7 @@ from duckdb import OutOfRangeException as DuckDBOutOfRangeException from duckdb import ParserException as DuckDBParserException except ImportError: - DuckDBConversionException = ( - DuckDBInvalidInputException - ) = ( - DuckDBParserException - ) = ( + DuckDBConversionException = DuckDBInvalidInputException = DuckDBParserException = ( DuckDBNotImplementedException ) = DuckDBBinderException = DuckDBOutOfRangeException = None From c470b7e888bc61e1123353917c653ad1d09a15ed Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Mon, 4 Mar 2024 08:11:28 -0500 Subject: [PATCH 8/8] chore: revert sql setup changes --- ci/schema/duckdb.sql | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ci/schema/duckdb.sql b/ci/schema/duckdb.sql index 6d732bf91799..50a82bfdc403 100644 --- a/ci/schema/duckdb.sql +++ b/ci/schema/duckdb.sql @@ -1,4 +1,4 @@ -CREATE TEMP TABLE array_types ( +CREATE OR REPLACE TABLE array_types ( x BIGINT[], y TEXT[], z DOUBLE PRECISION[], @@ -16,7 +16,7 @@ INSERT INTO array_types VALUES ([4, NULL, NULL, 5], ['d', NULL, NULL, 'e'], [4.0, NULL, NULL, 5.0], 'c', 6.0, [[1, 2, 3]]); -CREATE TEMP TABLE struct ( +CREATE OR REPLACE TABLE struct ( abc STRUCT(a DOUBLE, b STRING, c BIGINT) ); @@ -29,7 +29,7 @@ INSERT INTO struct VALUES (NULL), ({'a': 3.0, 'b': 'orange', 'c': NULL}); -CREATE TEMP TABLE json_t (js TEXT); +CREATE OR REPLACE TABLE json_t (js TEXT); INSERT INTO json_t VALUES ('{"a": [1,2,3,4], "b": 1}'), @@ -39,7 +39,7 @@ INSERT INTO json_t VALUES ('[42,47,55]'), ('[]'); -CREATE TEMP TABLE win (g TEXT, x BIGINT NOT NULL, y BIGINT); +CREATE OR REPLACE TABLE win (g TEXT, x BIGINT NOT NULL, y BIGINT); INSERT INTO win VALUES ('a', 0, 3), ('a', 1, 2), @@ -47,7 +47,7 @@ INSERT INTO win VALUES ('a', 3, 1), ('a', 4, 1); -CREATE TEMP TABLE map (idx BIGINT, kv MAP(STRING, BIGINT)); +CREATE OR REPLACE TABLE map (idx BIGINT, kv MAP(STRING, BIGINT)); INSERT INTO map VALUES (1, MAP(['a', 'b', 'c'], [1, 2, 3])), (2, MAP(['d', 'e', 'f'], [4, 5, 6]));