duckdb 1.4.1.dev137__cp310-cp310-macosx_10_9_x86_64.whl → 1.4.2.dev1__cp310-cp310-macosx_10_9_x86_64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of duckdb might be problematic. Click here for more details.
- _duckdb.cpython-310-darwin.so +0 -0
- duckdb/polars_io.py +10 -5
- {duckdb-1.4.1.dev137.dist-info → duckdb-1.4.2.dev1.dist-info}/METADATA +1 -1
- {duckdb-1.4.1.dev137.dist-info → duckdb-1.4.2.dev1.dist-info}/RECORD +6 -6
- {duckdb-1.4.1.dev137.dist-info → duckdb-1.4.2.dev1.dist-info}/WHEEL +0 -0
- {duckdb-1.4.1.dev137.dist-info → duckdb-1.4.2.dev1.dist-info}/licenses/LICENSE +0 -0
_duckdb.cpython-310-darwin.so
CHANGED
|
Binary file
|
duckdb/polars_io.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from __future__ import annotations # noqa: D100
|
|
2
2
|
|
|
3
|
+
import contextlib
|
|
3
4
|
import datetime
|
|
4
5
|
import json
|
|
5
6
|
import typing
|
|
@@ -176,9 +177,12 @@ def _pl_tree_to_sql(tree: _ExpressionTree) -> str:
|
|
|
176
177
|
if dtype.startswith("{'Decimal'") or dtype == "Decimal":
|
|
177
178
|
decimal_value = value["Decimal"]
|
|
178
179
|
assert isinstance(decimal_value, list), (
|
|
179
|
-
f"A {dtype} should be a two member list but got {type(decimal_value)}"
|
|
180
|
+
f"A {dtype} should be a two or three member list but got {type(decimal_value)}"
|
|
180
181
|
)
|
|
181
|
-
|
|
182
|
+
assert 2 <= len(decimal_value) <= 3, (
|
|
183
|
+
f"A {dtype} should be a two or three member list but got {len(decimal_value)} member list"
|
|
184
|
+
)
|
|
185
|
+
return str(Decimal(decimal_value[0]) / Decimal(10 ** decimal_value[-1]))
|
|
182
186
|
|
|
183
187
|
# Datetime with microseconds since epoch
|
|
184
188
|
if dtype.startswith("{'Datetime'") or dtype == "Datetime":
|
|
@@ -260,7 +264,8 @@ def duckdb_source(relation: duckdb.DuckDBPyRelation, schema: pl.schema.Schema) -
|
|
|
260
264
|
relation_final = relation_final.limit(n_rows)
|
|
261
265
|
if predicate is not None:
|
|
262
266
|
# We have a predicate, if possible, we push it down to DuckDB
|
|
263
|
-
|
|
267
|
+
with contextlib.suppress(AssertionError, KeyError):
|
|
268
|
+
duck_predicate = _predicate_to_expression(predicate)
|
|
264
269
|
# Try to pushdown filter, if one exists
|
|
265
270
|
if duck_predicate is not None:
|
|
266
271
|
relation_final = relation_final.filter(duck_predicate)
|
|
@@ -272,8 +277,8 @@ def duckdb_source(relation: duckdb.DuckDBPyRelation, schema: pl.schema.Schema) -
|
|
|
272
277
|
for record_batch in iter(results.read_next_batch, None):
|
|
273
278
|
if predicate is not None and duck_predicate is None:
|
|
274
279
|
# We have a predicate, but did not manage to push it down, we fallback here
|
|
275
|
-
yield pl.from_arrow(record_batch).filter(predicate) # type: ignore[arg-type,misc]
|
|
280
|
+
yield pl.from_arrow(record_batch).filter(predicate) # type: ignore[arg-type,misc,unused-ignore]
|
|
276
281
|
else:
|
|
277
|
-
yield pl.from_arrow(record_batch) # type: ignore[misc]
|
|
282
|
+
yield pl.from_arrow(record_batch) # type: ignore[misc,unused-ignore]
|
|
278
283
|
|
|
279
284
|
return register_io_source(source_generator, schema=schema)
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
_duckdb.cpython-310-darwin.so,sha256=
|
|
2
|
-
duckdb
|
|
3
|
-
duckdb-1.4.1.dev137.dist-info/WHEEL,sha256=T8H5RasNkXIpXzTFxhlD6m88-L5T5cStqz1ft4a3Trc,142
|
|
4
|
-
duckdb-1.4.1.dev137.dist-info/METADATA,sha256=XXuBjswA5OfnuyoaekQuPhAb55rikOxEDisw2DlQ1WA,14079
|
|
5
|
-
duckdb-1.4.1.dev137.dist-info/licenses/LICENSE,sha256=fhf9MSSfqHXLOxxeBcbD6Zt1UJ9qKATKF2wheDTeHcs,1072
|
|
6
|
-
duckdb/polars_io.py,sha256=MgU-lIJtd3TN3xM-YX5nbe92MACnYvnRO_eWaovbNDs,10700
|
|
1
|
+
_duckdb.cpython-310-darwin.so,sha256=kCE_22ofeuPQ12UO6g3MSrlOZrg5_cGrs_ADWswUprU,45443504
|
|
2
|
+
duckdb/polars_io.py,sha256=rOY2k5SKDvFQfxgTdkngi70CY8HRaPk-NE3u4vzY-YE,10996
|
|
7
3
|
duckdb/_version.py,sha256=YED0DUA67R3YQhz3hY_0QA_goTaWK2HE2epopxDxrIc,844
|
|
8
4
|
duckdb/_dbapi_type_object.py,sha256=NW-m3YcpJwwpQ4UC9lj68eioUB1NbdmgaaQID6v9ecU,6980
|
|
9
5
|
duckdb/filesystem.py,sha256=GjKX8kNZrGTVtZkRru6pPO6-A5oWP1Dd8Qi89J62TqA,1299
|
|
@@ -48,5 +44,9 @@ duckdb/func/__init__.py,sha256=oisXanDpKYjBG-tS1AMGVtodDGqKZspYbCLX5YlbWLQ,203
|
|
|
48
44
|
_duckdb-stubs/_func.pyi,sha256=1_39vmTVZZep_vSNVWVRBwLlz3YUk42yQeAvfZQXk1M,2086
|
|
49
45
|
_duckdb-stubs/_sqltypes.pyi,sha256=zJD-frBluEE2PrZccsHr9TjkTuWcCQLPe9FoG0YpKMI,2165
|
|
50
46
|
_duckdb-stubs/__init__.pyi,sha256=kPWv71k0P7ehfS7hjx-aj3GXA93QfuJtcRkPzV70s2U,63546
|
|
47
|
+
duckdb-1.4.2.dev1.dist-info/RECORD,,
|
|
48
|
+
duckdb-1.4.2.dev1.dist-info/WHEEL,sha256=T8H5RasNkXIpXzTFxhlD6m88-L5T5cStqz1ft4a3Trc,142
|
|
49
|
+
duckdb-1.4.2.dev1.dist-info/METADATA,sha256=QaZmYGfenUQK-GiCaWU3Kb3OiZNOGfzoxTBzYXvCX88,14077
|
|
50
|
+
duckdb-1.4.2.dev1.dist-info/licenses/LICENSE,sha256=fhf9MSSfqHXLOxxeBcbD6Zt1UJ9qKATKF2wheDTeHcs,1072
|
|
51
51
|
adbc_driver_duckdb/dbapi.py,sha256=Jg6JWpy2WUoew8XN-LU5BW7_RFDJQKmhaOYD7uPY6xo,3461
|
|
52
52
|
adbc_driver_duckdb/__init__.py,sha256=OIW5djWVmfo5fFFNzJLIPuWbAh0j5XbEoUG5OTmpSSs,1914
|
|
File without changes
|
|
File without changes
|