duckdb 1.4.1.dev135__cp39-cp39-macosx_10_9_x86_64.whl → 1.4.1.dev141__cp39-cp39-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.

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
- return str(Decimal(decimal_value[0]) / Decimal(10 ** decimal_value[1]))
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
- duck_predicate = _predicate_to_expression(predicate)
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)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: duckdb
3
- Version: 1.4.1.dev135
3
+ Version: 1.4.1.dev141
4
4
  Summary: DuckDB in-process database
5
5
  Keywords: DuckDB,Database,SQL,OLAP
6
6
  Author: DuckDB Foundation
@@ -1,9 +1,5 @@
1
- _duckdb.cpython-39-darwin.so,sha256=kx6JzEjWVoZaku8wfFkuGaPxUd05fKtZDLl5ybwsQJQ,45427088
2
- duckdb-1.4.1.dev135.dist-info/RECORD,,
3
- duckdb-1.4.1.dev135.dist-info/WHEEL,sha256=wHaY5XL9DdQwAP5DNYni-grnQ-wiYJZrePR4Yq1gr9U,140
4
- duckdb-1.4.1.dev135.dist-info/METADATA,sha256=fEOYqAXrsfECqQ3caYyj4iDZibxjR8hsnOkhfyL07ag,14079
5
- duckdb-1.4.1.dev135.dist-info/licenses/LICENSE,sha256=fhf9MSSfqHXLOxxeBcbD6Zt1UJ9qKATKF2wheDTeHcs,1072
6
- duckdb/polars_io.py,sha256=MgU-lIJtd3TN3xM-YX5nbe92MACnYvnRO_eWaovbNDs,10700
1
+ _duckdb.cpython-39-darwin.so,sha256=cvU70h0BEnWJwyLj2Gw5AuZFTSJtBIrtoulaP8OBESA,45443496
2
+ duckdb/polars_io.py,sha256=zi2FuinW2xN8nZtovAo7Moy-PWOEhfA2JQ7pZopxGPM,10968
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.1.dev141.dist-info/RECORD,,
48
+ duckdb-1.4.1.dev141.dist-info/WHEEL,sha256=wHaY5XL9DdQwAP5DNYni-grnQ-wiYJZrePR4Yq1gr9U,140
49
+ duckdb-1.4.1.dev141.dist-info/METADATA,sha256=2bY3nxtD2i6ae4yg0rE-CDiNTDIjAfeidCj0H0M3nPA,14079
50
+ duckdb-1.4.1.dev141.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