duckdb 1.4.1.dev125__cp39-cp39-macosx_11_0_arm64.whl → 1.5.0.dev37__cp39-cp39-macosx_11_0_arm64.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.

Files changed (48) hide show
  1. _duckdb.cpython-39-darwin.so +0 -0
  2. duckdb/__init__.py +374 -373
  3. duckdb/__init__.pyi +180 -604
  4. duckdb/bytes_io_wrapper.py +7 -6
  5. duckdb/experimental/__init__.py +1 -2
  6. duckdb/experimental/spark/__init__.py +4 -3
  7. duckdb/experimental/spark/_globals.py +8 -8
  8. duckdb/experimental/spark/_typing.py +9 -7
  9. duckdb/experimental/spark/conf.py +15 -16
  10. duckdb/experimental/spark/context.py +44 -60
  11. duckdb/experimental/spark/errors/__init__.py +35 -33
  12. duckdb/experimental/spark/errors/error_classes.py +1 -1
  13. duckdb/experimental/spark/errors/exceptions/__init__.py +1 -1
  14. duckdb/experimental/spark/errors/exceptions/base.py +88 -39
  15. duckdb/experimental/spark/errors/utils.py +16 -11
  16. duckdb/experimental/spark/exception.py +6 -9
  17. duckdb/experimental/spark/sql/__init__.py +5 -5
  18. duckdb/experimental/spark/sql/_typing.py +15 -8
  19. duckdb/experimental/spark/sql/catalog.py +20 -21
  20. duckdb/experimental/spark/sql/column.py +54 -47
  21. duckdb/experimental/spark/sql/conf.py +8 -9
  22. duckdb/experimental/spark/sql/dataframe.py +233 -185
  23. duckdb/experimental/spark/sql/functions.py +1248 -1222
  24. duckdb/experimental/spark/sql/group.py +52 -56
  25. duckdb/experimental/spark/sql/readwriter.py +94 -80
  26. duckdb/experimental/spark/sql/session.py +59 -64
  27. duckdb/experimental/spark/sql/streaming.py +10 -9
  28. duckdb/experimental/spark/sql/type_utils.py +64 -66
  29. duckdb/experimental/spark/sql/types.py +344 -308
  30. duckdb/experimental/spark/sql/udf.py +6 -6
  31. duckdb/filesystem.py +8 -13
  32. duckdb/functional/__init__.py +16 -2
  33. duckdb/polars_io.py +57 -66
  34. duckdb/query_graph/__main__.py +96 -91
  35. duckdb/typing/__init__.py +8 -8
  36. duckdb/typing/__init__.pyi +2 -4
  37. duckdb/udf.py +5 -10
  38. duckdb/value/__init__.py +0 -1
  39. duckdb/value/constant/__init__.py +59 -61
  40. duckdb/value/constant/__init__.pyi +4 -3
  41. duckdb-1.5.0.dev37.dist-info/METADATA +80 -0
  42. duckdb-1.5.0.dev37.dist-info/RECORD +47 -0
  43. adbc_driver_duckdb/__init__.py +0 -50
  44. adbc_driver_duckdb/dbapi.py +0 -115
  45. duckdb-1.4.1.dev125.dist-info/METADATA +0 -326
  46. duckdb-1.4.1.dev125.dist-info/RECORD +0 -49
  47. {duckdb-1.4.1.dev125.dist-info → duckdb-1.5.0.dev37.dist-info}/WHEEL +0 -0
  48. {duckdb-1.4.1.dev125.dist-info → duckdb-1.5.0.dev37.dist-info}/licenses/LICENSE +0 -0
@@ -1,6 +1,5 @@
1
- # ruff: noqa: D101, D104, D105, D107, ANN401
2
- from typing import Any
3
-
1
+ from typing import Any, Dict
2
+ from duckdb.typing import DuckDBPyType
4
3
  from duckdb.typing import (
5
4
  BIGINT,
6
5
  BIT,
@@ -10,31 +9,30 @@ from duckdb.typing import (
10
9
  DOUBLE,
11
10
  FLOAT,
12
11
  HUGEINT,
12
+ UHUGEINT,
13
13
  INTEGER,
14
14
  INTERVAL,
15
15
  SMALLINT,
16
16
  SQLNULL,
17
17
  TIME,
18
- TIME_TZ,
19
18
  TIMESTAMP,
20
19
  TIMESTAMP_MS,
21
20
  TIMESTAMP_NS,
22
21
  TIMESTAMP_S,
23
22
  TIMESTAMP_TZ,
23
+ TIME_TZ,
24
24
  TINYINT,
25
25
  UBIGINT,
26
- UHUGEINT,
27
26
  UINTEGER,
28
27
  USMALLINT,
29
28
  UTINYINT,
30
29
  UUID,
31
30
  VARCHAR,
32
- DuckDBPyType,
33
31
  )
34
32
 
35
33
 
36
34
  class Value:
37
- def __init__(self, object: Any, type: DuckDBPyType) -> None:
35
+ def __init__(self, object: Any, type: DuckDBPyType):
38
36
  self.object = object
39
37
  self.type = type
40
38
 
@@ -46,12 +44,12 @@ class Value:
46
44
 
47
45
 
48
46
  class NullValue(Value):
49
- def __init__(self) -> None:
47
+ def __init__(self):
50
48
  super().__init__(None, SQLNULL)
51
49
 
52
50
 
53
51
  class BooleanValue(Value):
54
- def __init__(self, object: Any) -> None:
52
+ def __init__(self, object: Any):
55
53
  super().__init__(object, BOOLEAN)
56
54
 
57
55
 
@@ -59,22 +57,22 @@ class BooleanValue(Value):
59
57
 
60
58
 
61
59
  class UnsignedBinaryValue(Value):
62
- def __init__(self, object: Any) -> None:
60
+ def __init__(self, object: Any):
63
61
  super().__init__(object, UTINYINT)
64
62
 
65
63
 
66
64
  class UnsignedShortValue(Value):
67
- def __init__(self, object: Any) -> None:
65
+ def __init__(self, object: Any):
68
66
  super().__init__(object, USMALLINT)
69
67
 
70
68
 
71
69
  class UnsignedIntegerValue(Value):
72
- def __init__(self, object: Any) -> None:
70
+ def __init__(self, object: Any):
73
71
  super().__init__(object, UINTEGER)
74
72
 
75
73
 
76
74
  class UnsignedLongValue(Value):
77
- def __init__(self, object: Any) -> None:
75
+ def __init__(self, object: Any):
78
76
  super().__init__(object, UBIGINT)
79
77
 
80
78
 
@@ -82,32 +80,32 @@ class UnsignedLongValue(Value):
82
80
 
83
81
 
84
82
  class BinaryValue(Value):
85
- def __init__(self, object: Any) -> None:
83
+ def __init__(self, object: Any):
86
84
  super().__init__(object, TINYINT)
87
85
 
88
86
 
89
87
  class ShortValue(Value):
90
- def __init__(self, object: Any) -> None:
88
+ def __init__(self, object: Any):
91
89
  super().__init__(object, SMALLINT)
92
90
 
93
91
 
94
92
  class IntegerValue(Value):
95
- def __init__(self, object: Any) -> None:
93
+ def __init__(self, object: Any):
96
94
  super().__init__(object, INTEGER)
97
95
 
98
96
 
99
97
  class LongValue(Value):
100
- def __init__(self, object: Any) -> None:
98
+ def __init__(self, object: Any):
101
99
  super().__init__(object, BIGINT)
102
100
 
103
101
 
104
102
  class HugeIntegerValue(Value):
105
- def __init__(self, object: Any) -> None:
103
+ def __init__(self, object: Any):
106
104
  super().__init__(object, HUGEINT)
107
105
 
108
106
 
109
107
  class UnsignedHugeIntegerValue(Value):
110
- def __init__(self, object: Any) -> None:
108
+ def __init__(self, object: Any):
111
109
  super().__init__(object, UHUGEINT)
112
110
 
113
111
 
@@ -115,17 +113,17 @@ class UnsignedHugeIntegerValue(Value):
115
113
 
116
114
 
117
115
  class FloatValue(Value):
118
- def __init__(self, object: Any) -> None:
116
+ def __init__(self, object: Any):
119
117
  super().__init__(object, FLOAT)
120
118
 
121
119
 
122
120
  class DoubleValue(Value):
123
- def __init__(self, object: Any) -> None:
121
+ def __init__(self, object: Any):
124
122
  super().__init__(object, DOUBLE)
125
123
 
126
124
 
127
125
  class DecimalValue(Value):
128
- def __init__(self, object: Any, width: int, scale: int) -> None:
126
+ def __init__(self, object: Any, width: int, scale: int):
129
127
  import duckdb
130
128
 
131
129
  decimal_type = duckdb.decimal_type(width, scale)
@@ -136,22 +134,22 @@ class DecimalValue(Value):
136
134
 
137
135
 
138
136
  class StringValue(Value):
139
- def __init__(self, object: Any) -> None:
137
+ def __init__(self, object: Any):
140
138
  super().__init__(object, VARCHAR)
141
139
 
142
140
 
143
141
  class UUIDValue(Value):
144
- def __init__(self, object: Any) -> None:
142
+ def __init__(self, object: Any):
145
143
  super().__init__(object, UUID)
146
144
 
147
145
 
148
146
  class BitValue(Value):
149
- def __init__(self, object: Any) -> None:
147
+ def __init__(self, object: Any):
150
148
  super().__init__(object, BIT)
151
149
 
152
150
 
153
151
  class BlobValue(Value):
154
- def __init__(self, object: Any) -> None:
152
+ def __init__(self, object: Any):
155
153
  super().__init__(object, BLOB)
156
154
 
157
155
 
@@ -159,52 +157,52 @@ class BlobValue(Value):
159
157
 
160
158
 
161
159
  class DateValue(Value):
162
- def __init__(self, object: Any) -> None:
160
+ def __init__(self, object: Any):
163
161
  super().__init__(object, DATE)
164
162
 
165
163
 
166
164
  class IntervalValue(Value):
167
- def __init__(self, object: Any) -> None:
165
+ def __init__(self, object: Any):
168
166
  super().__init__(object, INTERVAL)
169
167
 
170
168
 
171
169
  class TimestampValue(Value):
172
- def __init__(self, object: Any) -> None:
170
+ def __init__(self, object: Any):
173
171
  super().__init__(object, TIMESTAMP)
174
172
 
175
173
 
176
174
  class TimestampSecondValue(Value):
177
- def __init__(self, object: Any) -> None:
175
+ def __init__(self, object: Any):
178
176
  super().__init__(object, TIMESTAMP_S)
179
177
 
180
178
 
181
179
  class TimestampMilisecondValue(Value):
182
- def __init__(self, object: Any) -> None:
180
+ def __init__(self, object: Any):
183
181
  super().__init__(object, TIMESTAMP_MS)
184
182
 
185
183
 
186
184
  class TimestampNanosecondValue(Value):
187
- def __init__(self, object: Any) -> None:
185
+ def __init__(self, object: Any):
188
186
  super().__init__(object, TIMESTAMP_NS)
189
187
 
190
188
 
191
189
  class TimestampTimeZoneValue(Value):
192
- def __init__(self, object: Any) -> None:
190
+ def __init__(self, object: Any):
193
191
  super().__init__(object, TIMESTAMP_TZ)
194
192
 
195
193
 
196
194
  class TimeValue(Value):
197
- def __init__(self, object: Any) -> None:
195
+ def __init__(self, object: Any):
198
196
  super().__init__(object, TIME)
199
197
 
200
198
 
201
199
  class TimeTimeZoneValue(Value):
202
- def __init__(self, object: Any) -> None:
200
+ def __init__(self, object: Any):
203
201
  super().__init__(object, TIME_TZ)
204
202
 
205
203
 
206
204
  class ListValue(Value):
207
- def __init__(self, object: Any, child_type: DuckDBPyType) -> None:
205
+ def __init__(self, object: Any, child_type: DuckDBPyType):
208
206
  import duckdb
209
207
 
210
208
  list_type = duckdb.list_type(child_type)
@@ -212,7 +210,7 @@ class ListValue(Value):
212
210
 
213
211
 
214
212
  class StructValue(Value):
215
- def __init__(self, object: Any, children: dict[str, DuckDBPyType]) -> None:
213
+ def __init__(self, object: Any, children: Dict[str, DuckDBPyType]):
216
214
  import duckdb
217
215
 
218
216
  struct_type = duckdb.struct_type(children)
@@ -220,7 +218,7 @@ class StructValue(Value):
220
218
 
221
219
 
222
220
  class MapValue(Value):
223
- def __init__(self, object: Any, key_type: DuckDBPyType, value_type: DuckDBPyType) -> None:
221
+ def __init__(self, object: Any, key_type: DuckDBPyType, value_type: DuckDBPyType):
224
222
  import duckdb
225
223
 
226
224
  map_type = duckdb.map_type(key_type, value_type)
@@ -228,43 +226,43 @@ class MapValue(Value):
228
226
 
229
227
 
230
228
  class UnionType(Value):
231
- def __init__(self, object: Any, members: dict[str, DuckDBPyType]) -> None:
229
+ def __init__(self, object: Any, members: Dict[str, DuckDBPyType]):
232
230
  import duckdb
233
231
 
234
232
  union_type = duckdb.union_type(members)
235
233
  super().__init__(object, union_type)
236
234
 
237
235
 
238
- # TODO: add EnumValue once `duckdb.enum_type` is added # noqa: TD002, TD003
236
+ # TODO: add EnumValue once `duckdb.enum_type` is added
239
237
 
240
238
  __all__ = [
239
+ "Value",
240
+ "NullValue",
241
+ "BooleanValue",
242
+ "UnsignedBinaryValue",
243
+ "UnsignedShortValue",
244
+ "UnsignedIntegerValue",
245
+ "UnsignedLongValue",
241
246
  "BinaryValue",
247
+ "ShortValue",
248
+ "IntegerValue",
249
+ "LongValue",
250
+ "HugeIntegerValue",
251
+ "UnsignedHugeIntegerValue",
252
+ "FloatValue",
253
+ "DoubleValue",
254
+ "DecimalValue",
255
+ "StringValue",
256
+ "UUIDValue",
242
257
  "BitValue",
243
258
  "BlobValue",
244
- "BooleanValue",
245
259
  "DateValue",
246
- "DecimalValue",
247
- "DoubleValue",
248
- "FloatValue",
249
- "HugeIntegerValue",
250
- "IntegerValue",
251
260
  "IntervalValue",
252
- "LongValue",
253
- "NullValue",
254
- "ShortValue",
255
- "StringValue",
256
- "TimeTimeZoneValue",
257
- "TimeValue",
261
+ "TimestampValue",
262
+ "TimestampSecondValue",
258
263
  "TimestampMilisecondValue",
259
264
  "TimestampNanosecondValue",
260
- "TimestampSecondValue",
261
265
  "TimestampTimeZoneValue",
262
- "TimestampValue",
263
- "UUIDValue",
264
- "UnsignedBinaryValue",
265
- "UnsignedHugeIntegerValue",
266
- "UnsignedIntegerValue",
267
- "UnsignedLongValue",
268
- "UnsignedShortValue",
269
- "Value",
266
+ "TimeValue",
267
+ "TimeTimeZoneValue",
270
268
  ]
@@ -54,9 +54,9 @@ class DoubleValue(Value):
54
54
  def __repr__(self) -> str: ...
55
55
 
56
56
  class DecimalValue(Value):
57
- def __init__(self, object: Any, width: int, scale: int) -> None: ...
58
- def __repr__(self) -> str: ...
59
-
57
+ def __init__(self, object: Any, width: int, scale: int) -> None: ...
58
+ def __repr__(self) -> str: ...
59
+
60
60
  class StringValue(Value):
61
61
  def __init__(self, object: Any) -> None: ...
62
62
  def __repr__(self) -> str: ...
@@ -109,6 +109,7 @@ class TimeTimeZoneValue(Value):
109
109
  def __init__(self, object: Any) -> None: ...
110
110
  def __repr__(self) -> str: ...
111
111
 
112
+
112
113
  class Value:
113
114
  def __init__(self, object: Any, type: DuckDBPyType) -> None: ...
114
115
  def __repr__(self) -> str: ...
@@ -0,0 +1,80 @@
1
+ Metadata-Version: 2.1
2
+ Name: duckdb
3
+ Version: 1.5.0.dev37
4
+ Summary: DuckDB in-process database
5
+ Keywords: DuckDB,Database,SQL,OLAP
6
+ Author: DuckDB Foundation
7
+ Maintainer: DuckDB Foundation
8
+ Classifier: Development Status :: 3 - Alpha
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Operating System :: OS Independent
11
+ Classifier: Topic :: Database
12
+ Classifier: Topic :: Database :: Database Engines/Servers
13
+ Classifier: Topic :: Scientific/Engineering
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Intended Audience :: Education
16
+ Classifier: Intended Audience :: Information Technology
17
+ Classifier: Intended Audience :: Science/Research
18
+ Classifier: Programming Language :: Python
19
+ Classifier: Programming Language :: Python :: 3
20
+ Classifier: Programming Language :: Python :: 3 :: Only
21
+ Classifier: Programming Language :: Python :: 3.9
22
+ Classifier: Programming Language :: Python :: 3.10
23
+ Classifier: Programming Language :: Python :: 3.11
24
+ Classifier: Programming Language :: Python :: 3.12
25
+ Classifier: Programming Language :: Python :: 3.13
26
+ Classifier: Programming Language :: C++
27
+ Project-URL: Documentation, https://duckdb.org/docs/stable/clients/python/overview
28
+ Project-URL: Source, https://github.com/duckdb/duckdb-python
29
+ Project-URL: Issues, https://github.com/duckdb/duckdb-python/issues
30
+ Project-URL: Changelog, https://github.com/duckdb/duckdb/releases
31
+ Requires-Python: >=3.9.0
32
+ Provides-Extra: all
33
+ Requires-Dist: ipython; extra == "all"
34
+ Requires-Dist: fsspec; extra == "all"
35
+ Requires-Dist: numpy; extra == "all"
36
+ Requires-Dist: pandas; python_version < "3.14" and extra == "all"
37
+ Requires-Dist: pyarrow; python_version < "3.14" and extra == "all"
38
+ Requires-Dist: adbc_driver_manager; python_version < "3.14" and extra == "all"
39
+ Description-Content-Type: text/markdown
40
+
41
+ <div align="center">
42
+ <picture>
43
+ <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/duckdb/duckdb/refs/heads/main/logo/DuckDB_Logo-horizontal.svg">
44
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/duckdb/duckdb/refs/heads/main/logo/DuckDB_Logo-horizontal-dark-mode.svg">
45
+ <img alt="DuckDB logo" src="https://raw.githubusercontent.com/duckdb/duckdb/refs/heads/main/logo/DuckDB_Logo-horizontal.svg" height="100">
46
+ </picture>
47
+ </div>
48
+ <br />
49
+ <p align="center">
50
+ <a href="https://discord.gg/tcvwpjfnZx"><img src="https://shields.io/discord/909674491309850675" alt="Discord" /></a>
51
+ <a href="https://pypi.org/project/duckdb/"><img src="https://img.shields.io/pypi/v/duckdb.svg" alt="PyPI Latest Release"/></a>
52
+ </p>
53
+ <br />
54
+ <p align="center">
55
+ <a href="https://duckdb.org">DuckDB.org</a>
56
+ |
57
+ <a href="https://duckdb.org/docs/stable/guides/python/install">User Guide (Python)</a>
58
+ -
59
+ <a href="https://duckdb.org/docs/stable/clients/python/overview">API Docs (Python)</a>
60
+ </p>
61
+
62
+ # The [DuckDB](https://github.com/duckdb/duckdb) Python Package
63
+
64
+ ## Installation
65
+
66
+ Install the latest release of DuckDB directly from [PyPI](https://pypi.org/project/duckdb/):
67
+
68
+ ```bash
69
+ pip install duckdb
70
+ ```
71
+
72
+ Install with all optional dependencies:
73
+
74
+ ```bash
75
+ pip install 'duckdb[all]'
76
+ ```
77
+
78
+ ## Contributing
79
+
80
+ See the [CONTRIBUTING.md](CONTRIBUTING.md) for instructions on how to set up a development environment.
@@ -0,0 +1,47 @@
1
+ _duckdb.cpython-39-darwin.so,sha256=45YzWSA976GT9QA3In0-EOGGt7Yz5WCMVp3vy8WBTKU,43361664
2
+ duckdb-1.5.0.dev37.dist-info/RECORD,,
3
+ duckdb-1.5.0.dev37.dist-info/WHEEL,sha256=2dBuY6_W5zzmCOjU-j1QXsVFOOSmDZYYYvPlAwnAgj4,139
4
+ duckdb-1.5.0.dev37.dist-info/METADATA,sha256=ZkahqIdW8gNF9l3mZlxJNGqyUqFudI7pn-T3p0tIUSw,3251
5
+ duckdb-1.5.0.dev37.dist-info/licenses/LICENSE,sha256=fhf9MSSfqHXLOxxeBcbD6Zt1UJ9qKATKF2wheDTeHcs,1072
6
+ duckdb/polars_io.py,sha256=aYACypblQSzRRTM15p_MHBsC87bij3OkqZEJMIVYXtw,7984
7
+ duckdb/__init__.pyi,sha256=cor15j4NLa9RUe_TTUniloROcJ368UXRDBJNBV-xHaA,47644
8
+ duckdb/filesystem.py,sha256=9lhkbYbJ8pa__FeZaXe6xDyHRJP-z4t9W7rMe8Adz34,996
9
+ duckdb/__init__.py,sha256=h-yC_OlYI04Ijah-YDC6PUZYQzcS7lB8Z1V5_uGcJUA,8765
10
+ duckdb/bytes_io_wrapper.py,sha256=6tEb7dzuokqSEuQrtBGc546YyOncitfi6gUOO3OLIus,2984
11
+ duckdb/udf.py,sha256=c4eYs6p9R5UMyQjcHNoLTkshSoKutkVF4xwMlq0fljg,674
12
+ duckdb/experimental/__init__.py,sha256=dsaou_Axm4W4uMylH4NVC6KtR1JHjR0Zdni0lilAih8,44
13
+ duckdb/experimental/spark/exception.py,sha256=XLo4lz4wra6MJsbZ0MWnU0HWJx2UfUHUhN_q5dzFVyM,535
14
+ duckdb/experimental/spark/_typing.py,sha256=EZufFA9FUhowxCjdEWt_KM5vb3SKwoM917K9_3YG4mc,1525
15
+ duckdb/experimental/spark/LICENSE,sha256=_1qknFLpgwYnWC6YVPp2gn0Zw7BAuFYWLRctcqnpUGc,13387
16
+ duckdb/experimental/spark/_globals.py,sha256=EGZPzdav7a5g51-U2SXqHCA11aJU35kwjUbQNqSzttk,2434
17
+ duckdb/experimental/spark/conf.py,sha256=Z9WueVizlE-8DSRp9q5wiJbNvcCBIQJhHW9XyUpwioY,1398
18
+ duckdb/experimental/spark/__init__.py,sha256=z8_tXnY5VCEUu6fjNVH8ZllFq_Y4iPAcrWHmPg1v1So,284
19
+ duckdb/experimental/spark/context.py,sha256=QxyKtpi01ZV6wTqRM-k-gMVbzoJDG1pj66eP-TK3XhA,6209
20
+ duckdb/experimental/spark/errors/error_classes.py,sha256=ZIhQcpvC2wH1FzM7fa7UQBUIeQ1bRT-VArbC6TT0kx0,27249
21
+ duckdb/experimental/spark/errors/__init__.py,sha256=RDhcD08gQIzO1JVFZUu-wRj1td2NOvro_Qsyy3MIexs,2146
22
+ duckdb/experimental/spark/errors/utils.py,sha256=gHmg1yrN6rATUoHGuzsoDeAl-LULRnML6iR_dlMwUTk,4438
23
+ duckdb/experimental/spark/errors/exceptions/__init__.py,sha256=c0bKYjIaffoqkm7ZgaR53O64pH33BYzSzFxNFPweSjU,784
24
+ duckdb/experimental/spark/errors/exceptions/base.py,sha256=k0WMP7EoIhtYqbYSufyYLYnKY2uzCB8WMg74-JZjnqI,5360
25
+ duckdb/experimental/spark/sql/catalog.py,sha256=K8W85ccXlN8LzRZAkh5zpFvErpNiDySgAOL0rAfEAEw,2284
26
+ duckdb/experimental/spark/sql/functions.py,sha256=5hD64AjJbO5ER0xtEnTlmVoOINLLQ3O0ooVyk_SUcus,173108
27
+ duckdb/experimental/spark/sql/_typing.py,sha256=5CwczuoxRLcIwnfGT4OWC19n6ctsC8JFKNjY4yQ-pFE,2361
28
+ duckdb/experimental/spark/sql/dataframe.py,sha256=8PvzieUlTTEyqqLgR8IJFtJH9E8UGH6vL3mlFz-EAQI,46398
29
+ duckdb/experimental/spark/sql/conf.py,sha256=8yIcAD8S4T1f5L1MnjMf86LXxBABu6lbJJJrd_l15Y8,656
30
+ duckdb/experimental/spark/sql/session.py,sha256=TWrUyepTAIFWMavYwguPiNHVGpc3RHQXK63MQfhQS1A,8998
31
+ duckdb/experimental/spark/sql/type_utils.py,sha256=YoUxq5KhwfHb4CCIKaEAIbM3R3Ol5_XErjbRJ30eICA,2954
32
+ duckdb/experimental/spark/sql/__init__.py,sha256=R83MKgikp6bwNv9MV_MV14gQFwOJA5f_BhaTWNu0B4w,256
33
+ duckdb/experimental/spark/sql/types.py,sha256=ArGYPPFDIV8seol7EdxiJPZttV5Ld8dzN3TEmCUDNaI,39159
34
+ duckdb/experimental/spark/sql/readwriter.py,sha256=q6Nldqeg5FEzqcc0ydzlJPfOkpq8Wrx9-527mWPP9Ts,17301
35
+ duckdb/experimental/spark/sql/group.py,sha256=d2rojDeTlB1aRZU0TFFSdGwO6biXO8o-gLLiKmFFnNA,13275
36
+ duckdb/experimental/spark/sql/udf.py,sha256=wul2wqnbV4d9zFmDw4G6ZEiRddUkPHat3HY1xL5u5dQ,1081
37
+ duckdb/experimental/spark/sql/streaming.py,sha256=XsXZjtpbeuGHQGXogzvApEUQxe4o6-YHvy6z4AcdT5o,1023
38
+ duckdb/experimental/spark/sql/column.py,sha256=J0RJrR74WN-8WWXMWHtCkqztcrYQ8WuSfwOc4zJlUlU,10708
39
+ duckdb/query_graph/__main__.py,sha256=82OHL1N6aB9TlbmKJny8w_EdxJnijq_pEto1NOT0hCQ,11259
40
+ duckdb/value/__init__.pyi,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
41
+ duckdb/value/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
42
+ duckdb/value/constant/__init__.pyi,sha256=LFEjUoKOoLQCXjwcR7t5o6CFNaiZQyUygFz-gQHgP1Y,3279
43
+ duckdb/value/constant/__init__.py,sha256=XMKbHy9xVtsA59G5053m_UTNAGzthAVxJbA8ghKqmJw,5516
44
+ duckdb/typing/__init__.pyi,sha256=bOkRuedw-3Cw7KP6I3DVdQQBS_uGdnPsyki8H417hN8,928
45
+ duckdb/typing/__init__.py,sha256=1uy_ItOCRLLVqzUe_jL1qC3-SGf_bb-HvwW1QOrKSXA,854
46
+ duckdb/functional/__init__.pyi,sha256=HsIdFEv3h32XH06Jg2ppRjg038uWzjWapyJ51A_LoI4,774
47
+ duckdb/functional/__init__.py,sha256=Ntz7FBorwQ18ldEo-KJpSWIP33S8WGNZlsyva0zG7tQ,212
@@ -1,50 +0,0 @@
1
- # Licensed to the Apache Software Foundation (ASF) under one
2
- # or more contributor license agreements. See the NOTICE file
3
- # distributed with this work for additional information
4
- # regarding copyright ownership. The ASF licenses this file
5
- # to you under the Apache License, Version 2.0 (the
6
- # "License"); you may not use this file except in compliance
7
- # with the License. You may obtain a copy of the License at
8
- #
9
- # http://www.apache.org/licenses/LICENSE-2.0
10
- #
11
- # Unless required by applicable law or agreed to in writing,
12
- # software distributed under the License is distributed on an
13
- # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
- # KIND, either express or implied. See the License for the
15
- # specific language governing permissions and limitations
16
- # under the License.
17
-
18
- """Low-level ADBC bindings for the DuckDB driver."""
19
-
20
- import enum
21
- import functools
22
- import importlib
23
- import typing
24
-
25
- import adbc_driver_manager
26
-
27
-
28
- class StatementOptions(enum.Enum):
29
- """Statement options specific to the DuckDB driver."""
30
-
31
- #: The number of rows per batch. Defaults to 2048.
32
- BATCH_ROWS = "adbc.duckdb.query.batch_rows"
33
-
34
-
35
- def connect(path: typing.Optional[str] = None) -> adbc_driver_manager.AdbcDatabase:
36
- """Create a low level ADBC connection to DuckDB."""
37
- if path is None:
38
- return adbc_driver_manager.AdbcDatabase(driver=driver_path(), entrypoint="duckdb_adbc_init")
39
- return adbc_driver_manager.AdbcDatabase(driver=driver_path(), entrypoint="duckdb_adbc_init", path=path)
40
-
41
-
42
- @functools.cache
43
- def driver_path() -> str:
44
- """Get the path to the DuckDB ADBC driver."""
45
- duckdb_module_spec = importlib.util.find_spec("_duckdb")
46
- if duckdb_module_spec is None:
47
- msg = "Could not find duckdb shared library. Did you pip install duckdb?"
48
- raise ImportError(msg)
49
- print(f"Found duckdb shared library at {duckdb_module_spec.origin}")
50
- return duckdb_module_spec.origin
@@ -1,115 +0,0 @@
1
- # Licensed to the Apache Software Foundation (ASF) under one
2
- # or more contributor license agreements. See the NOTICE file
3
- # distributed with this work for additional information
4
- # regarding copyright ownership. The ASF licenses this file
5
- # to you under the Apache License, Version 2.0 (the
6
- # "License"); you may not use this file except in compliance
7
- # with the License. You may obtain a copy of the License at
8
- #
9
- # http://www.apache.org/licenses/LICENSE-2.0
10
- #
11
- # Unless required by applicable law or agreed to in writing,
12
- # software distributed under the License is distributed on an
13
- # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
- # KIND, either express or implied. See the License for the
15
- # specific language governing permissions and limitations
16
- # under the License.
17
-
18
- """DBAPI 2.0-compatible facade for the ADBC DuckDB driver."""
19
-
20
- import typing
21
-
22
- import adbc_driver_manager
23
- import adbc_driver_manager.dbapi
24
-
25
- import adbc_driver_duckdb
26
-
27
- __all__ = [
28
- "BINARY",
29
- "DATETIME",
30
- "NUMBER",
31
- "ROWID",
32
- "STRING",
33
- "Connection",
34
- "Cursor",
35
- "DataError",
36
- "DatabaseError",
37
- "Date",
38
- "DateFromTicks",
39
- "Error",
40
- "IntegrityError",
41
- "InterfaceError",
42
- "InternalError",
43
- "NotSupportedError",
44
- "OperationalError",
45
- "ProgrammingError",
46
- "Time",
47
- "TimeFromTicks",
48
- "Timestamp",
49
- "TimestampFromTicks",
50
- "Warning",
51
- "apilevel",
52
- "connect",
53
- "paramstyle",
54
- "threadsafety",
55
- ]
56
-
57
- # ----------------------------------------------------------
58
- # Globals
59
-
60
- apilevel = adbc_driver_manager.dbapi.apilevel
61
- threadsafety = adbc_driver_manager.dbapi.threadsafety
62
- paramstyle = "qmark"
63
-
64
- Warning = adbc_driver_manager.dbapi.Warning
65
- Error = adbc_driver_manager.dbapi.Error
66
- InterfaceError = adbc_driver_manager.dbapi.InterfaceError
67
- DatabaseError = adbc_driver_manager.dbapi.DatabaseError
68
- DataError = adbc_driver_manager.dbapi.DataError
69
- OperationalError = adbc_driver_manager.dbapi.OperationalError
70
- IntegrityError = adbc_driver_manager.dbapi.IntegrityError
71
- InternalError = adbc_driver_manager.dbapi.InternalError
72
- ProgrammingError = adbc_driver_manager.dbapi.ProgrammingError
73
- NotSupportedError = adbc_driver_manager.dbapi.NotSupportedError
74
-
75
- # ----------------------------------------------------------
76
- # Types
77
-
78
- Date = adbc_driver_manager.dbapi.Date
79
- Time = adbc_driver_manager.dbapi.Time
80
- Timestamp = adbc_driver_manager.dbapi.Timestamp
81
- DateFromTicks = adbc_driver_manager.dbapi.DateFromTicks
82
- TimeFromTicks = adbc_driver_manager.dbapi.TimeFromTicks
83
- TimestampFromTicks = adbc_driver_manager.dbapi.TimestampFromTicks
84
- STRING = adbc_driver_manager.dbapi.STRING
85
- BINARY = adbc_driver_manager.dbapi.BINARY
86
- NUMBER = adbc_driver_manager.dbapi.NUMBER
87
- DATETIME = adbc_driver_manager.dbapi.DATETIME
88
- ROWID = adbc_driver_manager.dbapi.ROWID
89
-
90
- # ----------------------------------------------------------
91
- # Functions
92
-
93
-
94
- def connect(path: typing.Optional[str] = None, **kwargs) -> "Connection":
95
- """Connect to DuckDB via ADBC."""
96
- db = None
97
- conn = None
98
-
99
- try:
100
- db = adbc_driver_duckdb.connect(path)
101
- conn = adbc_driver_manager.AdbcConnection(db)
102
- return adbc_driver_manager.dbapi.Connection(db, conn, **kwargs)
103
- except Exception:
104
- if conn:
105
- conn.close()
106
- if db:
107
- db.close()
108
- raise
109
-
110
-
111
- # ----------------------------------------------------------
112
- # Classes
113
-
114
- Connection = adbc_driver_manager.dbapi.Connection
115
- Cursor = adbc_driver_manager.dbapi.Cursor