duckdb 1.4.0.dev159__cp39-cp39-macosx_10_9_universal2.whl → 1.4.2.dev1__cp39-cp39-macosx_10_9_universal2.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-stubs/__init__.pyi +1443 -0
- _duckdb-stubs/_func.pyi +46 -0
- _duckdb-stubs/_sqltypes.pyi +75 -0
- _duckdb.cpython-39-darwin.so +0 -0
- adbc_driver_duckdb/__init__.py +50 -0
- adbc_driver_duckdb/dbapi.py +115 -0
- duckdb/__init__.py +341 -392
- duckdb/_dbapi_type_object.py +231 -0
- duckdb/_version.py +22 -0
- duckdb/bytes_io_wrapper.py +12 -9
- duckdb/experimental/__init__.py +2 -1
- duckdb/experimental/spark/__init__.py +3 -4
- duckdb/experimental/spark/_globals.py +8 -8
- duckdb/experimental/spark/_typing.py +7 -9
- duckdb/experimental/spark/conf.py +16 -15
- duckdb/experimental/spark/context.py +60 -44
- duckdb/experimental/spark/errors/__init__.py +33 -35
- duckdb/experimental/spark/errors/error_classes.py +1 -1
- duckdb/experimental/spark/errors/exceptions/__init__.py +1 -1
- duckdb/experimental/spark/errors/exceptions/base.py +39 -88
- duckdb/experimental/spark/errors/utils.py +11 -16
- duckdb/experimental/spark/exception.py +9 -6
- duckdb/experimental/spark/sql/__init__.py +5 -5
- duckdb/experimental/spark/sql/_typing.py +8 -15
- duckdb/experimental/spark/sql/catalog.py +21 -20
- duckdb/experimental/spark/sql/column.py +48 -55
- duckdb/experimental/spark/sql/conf.py +9 -8
- duckdb/experimental/spark/sql/dataframe.py +186 -234
- duckdb/experimental/spark/sql/functions.py +1317 -1220
- duckdb/experimental/spark/sql/group.py +56 -52
- duckdb/experimental/spark/sql/readwriter.py +80 -94
- duckdb/experimental/spark/sql/session.py +64 -59
- duckdb/experimental/spark/sql/streaming.py +9 -10
- duckdb/experimental/spark/sql/type_utils.py +67 -65
- duckdb/experimental/spark/sql/types.py +309 -345
- duckdb/experimental/spark/sql/udf.py +6 -6
- duckdb/filesystem.py +26 -16
- duckdb/func/__init__.py +3 -0
- duckdb/functional/__init__.py +12 -16
- duckdb/polars_io.py +141 -82
- duckdb/query_graph/__main__.py +91 -96
- duckdb/sqltypes/__init__.py +63 -0
- duckdb/typing/__init__.py +18 -8
- duckdb/udf.py +10 -5
- duckdb/value/__init__.py +1 -0
- duckdb/value/constant/__init__.py +62 -60
- {duckdb-1.4.0.dev159.dist-info → duckdb-1.4.2.dev1.dist-info}/METADATA +38 -30
- duckdb-1.4.2.dev1.dist-info/RECORD +52 -0
- duckdb/__init__.pyi +0 -712
- duckdb/functional/__init__.pyi +0 -31
- duckdb/typing/__init__.pyi +0 -36
- duckdb/value/constant/__init__.pyi +0 -115
- duckdb-1.4.0.dev159.dist-info/RECORD +0 -47
- /duckdb/{value/__init__.pyi → py.typed} +0 -0
- {duckdb-1.4.0.dev159.dist-info → duckdb-1.4.2.dev1.dist-info}/WHEEL +0 -0
- {duckdb-1.4.0.dev159.dist-info → duckdb-1.4.2.dev1.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
from
|
|
3
|
-
|
|
1
|
+
# ruff: noqa: D101, D104, D105, D107, ANN401
|
|
2
|
+
from typing import Any
|
|
3
|
+
|
|
4
|
+
from duckdb.sqltypes import (
|
|
4
5
|
BIGINT,
|
|
5
6
|
BIT,
|
|
6
7
|
BLOB,
|
|
@@ -9,30 +10,31 @@ from duckdb.typing import (
|
|
|
9
10
|
DOUBLE,
|
|
10
11
|
FLOAT,
|
|
11
12
|
HUGEINT,
|
|
12
|
-
UHUGEINT,
|
|
13
13
|
INTEGER,
|
|
14
14
|
INTERVAL,
|
|
15
15
|
SMALLINT,
|
|
16
16
|
SQLNULL,
|
|
17
17
|
TIME,
|
|
18
|
+
TIME_TZ,
|
|
18
19
|
TIMESTAMP,
|
|
19
20
|
TIMESTAMP_MS,
|
|
20
21
|
TIMESTAMP_NS,
|
|
21
22
|
TIMESTAMP_S,
|
|
22
23
|
TIMESTAMP_TZ,
|
|
23
|
-
TIME_TZ,
|
|
24
24
|
TINYINT,
|
|
25
25
|
UBIGINT,
|
|
26
|
+
UHUGEINT,
|
|
26
27
|
UINTEGER,
|
|
27
28
|
USMALLINT,
|
|
28
29
|
UTINYINT,
|
|
29
30
|
UUID,
|
|
30
31
|
VARCHAR,
|
|
32
|
+
DuckDBPyType,
|
|
31
33
|
)
|
|
32
34
|
|
|
33
35
|
|
|
34
36
|
class Value:
|
|
35
|
-
def __init__(self, object: Any, type: DuckDBPyType):
|
|
37
|
+
def __init__(self, object: Any, type: DuckDBPyType) -> None:
|
|
36
38
|
self.object = object
|
|
37
39
|
self.type = type
|
|
38
40
|
|
|
@@ -44,12 +46,12 @@ class Value:
|
|
|
44
46
|
|
|
45
47
|
|
|
46
48
|
class NullValue(Value):
|
|
47
|
-
def __init__(self):
|
|
49
|
+
def __init__(self) -> None:
|
|
48
50
|
super().__init__(None, SQLNULL)
|
|
49
51
|
|
|
50
52
|
|
|
51
53
|
class BooleanValue(Value):
|
|
52
|
-
def __init__(self, object: Any):
|
|
54
|
+
def __init__(self, object: Any) -> None:
|
|
53
55
|
super().__init__(object, BOOLEAN)
|
|
54
56
|
|
|
55
57
|
|
|
@@ -57,22 +59,22 @@ class BooleanValue(Value):
|
|
|
57
59
|
|
|
58
60
|
|
|
59
61
|
class UnsignedBinaryValue(Value):
|
|
60
|
-
def __init__(self, object: Any):
|
|
62
|
+
def __init__(self, object: Any) -> None:
|
|
61
63
|
super().__init__(object, UTINYINT)
|
|
62
64
|
|
|
63
65
|
|
|
64
66
|
class UnsignedShortValue(Value):
|
|
65
|
-
def __init__(self, object: Any):
|
|
67
|
+
def __init__(self, object: Any) -> None:
|
|
66
68
|
super().__init__(object, USMALLINT)
|
|
67
69
|
|
|
68
70
|
|
|
69
71
|
class UnsignedIntegerValue(Value):
|
|
70
|
-
def __init__(self, object: Any):
|
|
72
|
+
def __init__(self, object: Any) -> None:
|
|
71
73
|
super().__init__(object, UINTEGER)
|
|
72
74
|
|
|
73
75
|
|
|
74
76
|
class UnsignedLongValue(Value):
|
|
75
|
-
def __init__(self, object: Any):
|
|
77
|
+
def __init__(self, object: Any) -> None:
|
|
76
78
|
super().__init__(object, UBIGINT)
|
|
77
79
|
|
|
78
80
|
|
|
@@ -80,32 +82,32 @@ class UnsignedLongValue(Value):
|
|
|
80
82
|
|
|
81
83
|
|
|
82
84
|
class BinaryValue(Value):
|
|
83
|
-
def __init__(self, object: Any):
|
|
85
|
+
def __init__(self, object: Any) -> None:
|
|
84
86
|
super().__init__(object, TINYINT)
|
|
85
87
|
|
|
86
88
|
|
|
87
89
|
class ShortValue(Value):
|
|
88
|
-
def __init__(self, object: Any):
|
|
90
|
+
def __init__(self, object: Any) -> None:
|
|
89
91
|
super().__init__(object, SMALLINT)
|
|
90
92
|
|
|
91
93
|
|
|
92
94
|
class IntegerValue(Value):
|
|
93
|
-
def __init__(self, object: Any):
|
|
95
|
+
def __init__(self, object: Any) -> None:
|
|
94
96
|
super().__init__(object, INTEGER)
|
|
95
97
|
|
|
96
98
|
|
|
97
99
|
class LongValue(Value):
|
|
98
|
-
def __init__(self, object: Any):
|
|
100
|
+
def __init__(self, object: Any) -> None:
|
|
99
101
|
super().__init__(object, BIGINT)
|
|
100
102
|
|
|
101
103
|
|
|
102
104
|
class HugeIntegerValue(Value):
|
|
103
|
-
def __init__(self, object: Any):
|
|
105
|
+
def __init__(self, object: Any) -> None:
|
|
104
106
|
super().__init__(object, HUGEINT)
|
|
105
107
|
|
|
106
108
|
|
|
107
109
|
class UnsignedHugeIntegerValue(Value):
|
|
108
|
-
def __init__(self, object: Any):
|
|
110
|
+
def __init__(self, object: Any) -> None:
|
|
109
111
|
super().__init__(object, UHUGEINT)
|
|
110
112
|
|
|
111
113
|
|
|
@@ -113,17 +115,17 @@ class UnsignedHugeIntegerValue(Value):
|
|
|
113
115
|
|
|
114
116
|
|
|
115
117
|
class FloatValue(Value):
|
|
116
|
-
def __init__(self, object: Any):
|
|
118
|
+
def __init__(self, object: Any) -> None:
|
|
117
119
|
super().__init__(object, FLOAT)
|
|
118
120
|
|
|
119
121
|
|
|
120
122
|
class DoubleValue(Value):
|
|
121
|
-
def __init__(self, object: Any):
|
|
123
|
+
def __init__(self, object: Any) -> None:
|
|
122
124
|
super().__init__(object, DOUBLE)
|
|
123
125
|
|
|
124
126
|
|
|
125
127
|
class DecimalValue(Value):
|
|
126
|
-
def __init__(self, object: Any, width: int, scale: int):
|
|
128
|
+
def __init__(self, object: Any, width: int, scale: int) -> None:
|
|
127
129
|
import duckdb
|
|
128
130
|
|
|
129
131
|
decimal_type = duckdb.decimal_type(width, scale)
|
|
@@ -134,22 +136,22 @@ class DecimalValue(Value):
|
|
|
134
136
|
|
|
135
137
|
|
|
136
138
|
class StringValue(Value):
|
|
137
|
-
def __init__(self, object: Any):
|
|
139
|
+
def __init__(self, object: Any) -> None:
|
|
138
140
|
super().__init__(object, VARCHAR)
|
|
139
141
|
|
|
140
142
|
|
|
141
143
|
class UUIDValue(Value):
|
|
142
|
-
def __init__(self, object: Any):
|
|
144
|
+
def __init__(self, object: Any) -> None:
|
|
143
145
|
super().__init__(object, UUID)
|
|
144
146
|
|
|
145
147
|
|
|
146
148
|
class BitValue(Value):
|
|
147
|
-
def __init__(self, object: Any):
|
|
149
|
+
def __init__(self, object: Any) -> None:
|
|
148
150
|
super().__init__(object, BIT)
|
|
149
151
|
|
|
150
152
|
|
|
151
153
|
class BlobValue(Value):
|
|
152
|
-
def __init__(self, object: Any):
|
|
154
|
+
def __init__(self, object: Any) -> None:
|
|
153
155
|
super().__init__(object, BLOB)
|
|
154
156
|
|
|
155
157
|
|
|
@@ -157,52 +159,52 @@ class BlobValue(Value):
|
|
|
157
159
|
|
|
158
160
|
|
|
159
161
|
class DateValue(Value):
|
|
160
|
-
def __init__(self, object: Any):
|
|
162
|
+
def __init__(self, object: Any) -> None:
|
|
161
163
|
super().__init__(object, DATE)
|
|
162
164
|
|
|
163
165
|
|
|
164
166
|
class IntervalValue(Value):
|
|
165
|
-
def __init__(self, object: Any):
|
|
167
|
+
def __init__(self, object: Any) -> None:
|
|
166
168
|
super().__init__(object, INTERVAL)
|
|
167
169
|
|
|
168
170
|
|
|
169
171
|
class TimestampValue(Value):
|
|
170
|
-
def __init__(self, object: Any):
|
|
172
|
+
def __init__(self, object: Any) -> None:
|
|
171
173
|
super().__init__(object, TIMESTAMP)
|
|
172
174
|
|
|
173
175
|
|
|
174
176
|
class TimestampSecondValue(Value):
|
|
175
|
-
def __init__(self, object: Any):
|
|
177
|
+
def __init__(self, object: Any) -> None:
|
|
176
178
|
super().__init__(object, TIMESTAMP_S)
|
|
177
179
|
|
|
178
180
|
|
|
179
181
|
class TimestampMilisecondValue(Value):
|
|
180
|
-
def __init__(self, object: Any):
|
|
182
|
+
def __init__(self, object: Any) -> None:
|
|
181
183
|
super().__init__(object, TIMESTAMP_MS)
|
|
182
184
|
|
|
183
185
|
|
|
184
186
|
class TimestampNanosecondValue(Value):
|
|
185
|
-
def __init__(self, object: Any):
|
|
187
|
+
def __init__(self, object: Any) -> None:
|
|
186
188
|
super().__init__(object, TIMESTAMP_NS)
|
|
187
189
|
|
|
188
190
|
|
|
189
191
|
class TimestampTimeZoneValue(Value):
|
|
190
|
-
def __init__(self, object: Any):
|
|
192
|
+
def __init__(self, object: Any) -> None:
|
|
191
193
|
super().__init__(object, TIMESTAMP_TZ)
|
|
192
194
|
|
|
193
195
|
|
|
194
196
|
class TimeValue(Value):
|
|
195
|
-
def __init__(self, object: Any):
|
|
197
|
+
def __init__(self, object: Any) -> None:
|
|
196
198
|
super().__init__(object, TIME)
|
|
197
199
|
|
|
198
200
|
|
|
199
201
|
class TimeTimeZoneValue(Value):
|
|
200
|
-
def __init__(self, object: Any):
|
|
202
|
+
def __init__(self, object: Any) -> None:
|
|
201
203
|
super().__init__(object, TIME_TZ)
|
|
202
204
|
|
|
203
205
|
|
|
204
206
|
class ListValue(Value):
|
|
205
|
-
def __init__(self, object: Any, child_type: DuckDBPyType):
|
|
207
|
+
def __init__(self, object: Any, child_type: DuckDBPyType) -> None:
|
|
206
208
|
import duckdb
|
|
207
209
|
|
|
208
210
|
list_type = duckdb.list_type(child_type)
|
|
@@ -210,7 +212,7 @@ class ListValue(Value):
|
|
|
210
212
|
|
|
211
213
|
|
|
212
214
|
class StructValue(Value):
|
|
213
|
-
def __init__(self, object: Any, children:
|
|
215
|
+
def __init__(self, object: Any, children: dict[str, DuckDBPyType]) -> None:
|
|
214
216
|
import duckdb
|
|
215
217
|
|
|
216
218
|
struct_type = duckdb.struct_type(children)
|
|
@@ -218,7 +220,7 @@ class StructValue(Value):
|
|
|
218
220
|
|
|
219
221
|
|
|
220
222
|
class MapValue(Value):
|
|
221
|
-
def __init__(self, object: Any, key_type: DuckDBPyType, value_type: DuckDBPyType):
|
|
223
|
+
def __init__(self, object: Any, key_type: DuckDBPyType, value_type: DuckDBPyType) -> None:
|
|
222
224
|
import duckdb
|
|
223
225
|
|
|
224
226
|
map_type = duckdb.map_type(key_type, value_type)
|
|
@@ -226,43 +228,43 @@ class MapValue(Value):
|
|
|
226
228
|
|
|
227
229
|
|
|
228
230
|
class UnionType(Value):
|
|
229
|
-
def __init__(self, object: Any, members:
|
|
231
|
+
def __init__(self, object: Any, members: dict[str, DuckDBPyType]) -> None:
|
|
230
232
|
import duckdb
|
|
231
233
|
|
|
232
234
|
union_type = duckdb.union_type(members)
|
|
233
235
|
super().__init__(object, union_type)
|
|
234
236
|
|
|
235
237
|
|
|
236
|
-
# TODO: add EnumValue once `duckdb.enum_type` is added
|
|
238
|
+
# TODO: add EnumValue once `duckdb.enum_type` is added # noqa: TD002, TD003
|
|
237
239
|
|
|
238
240
|
__all__ = [
|
|
239
|
-
"Value",
|
|
240
|
-
"NullValue",
|
|
241
|
-
"BooleanValue",
|
|
242
|
-
"UnsignedBinaryValue",
|
|
243
|
-
"UnsignedShortValue",
|
|
244
|
-
"UnsignedIntegerValue",
|
|
245
|
-
"UnsignedLongValue",
|
|
246
241
|
"BinaryValue",
|
|
247
|
-
"ShortValue",
|
|
248
|
-
"IntegerValue",
|
|
249
|
-
"LongValue",
|
|
250
|
-
"HugeIntegerValue",
|
|
251
|
-
"UnsignedHugeIntegerValue",
|
|
252
|
-
"FloatValue",
|
|
253
|
-
"DoubleValue",
|
|
254
|
-
"DecimalValue",
|
|
255
|
-
"StringValue",
|
|
256
|
-
"UUIDValue",
|
|
257
242
|
"BitValue",
|
|
258
243
|
"BlobValue",
|
|
244
|
+
"BooleanValue",
|
|
259
245
|
"DateValue",
|
|
246
|
+
"DecimalValue",
|
|
247
|
+
"DoubleValue",
|
|
248
|
+
"FloatValue",
|
|
249
|
+
"HugeIntegerValue",
|
|
250
|
+
"IntegerValue",
|
|
260
251
|
"IntervalValue",
|
|
261
|
-
"
|
|
262
|
-
"
|
|
252
|
+
"LongValue",
|
|
253
|
+
"NullValue",
|
|
254
|
+
"ShortValue",
|
|
255
|
+
"StringValue",
|
|
256
|
+
"TimeTimeZoneValue",
|
|
257
|
+
"TimeValue",
|
|
263
258
|
"TimestampMilisecondValue",
|
|
264
259
|
"TimestampNanosecondValue",
|
|
260
|
+
"TimestampSecondValue",
|
|
265
261
|
"TimestampTimeZoneValue",
|
|
266
|
-
"
|
|
267
|
-
"
|
|
262
|
+
"TimestampValue",
|
|
263
|
+
"UUIDValue",
|
|
264
|
+
"UnsignedBinaryValue",
|
|
265
|
+
"UnsignedHugeIntegerValue",
|
|
266
|
+
"UnsignedIntegerValue",
|
|
267
|
+
"UnsignedLongValue",
|
|
268
|
+
"UnsignedShortValue",
|
|
269
|
+
"Value",
|
|
268
270
|
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: duckdb
|
|
3
|
-
Version: 1.4.
|
|
3
|
+
Version: 1.4.2.dev1
|
|
4
4
|
Summary: DuckDB in-process database
|
|
5
5
|
Keywords: DuckDB,Database,SQL,OLAP
|
|
6
6
|
Author: DuckDB Foundation
|
|
@@ -25,8 +25,8 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
25
25
|
Classifier: Programming Language :: Python :: 3.13
|
|
26
26
|
Classifier: Programming Language :: C++
|
|
27
27
|
Project-URL: Documentation, https://duckdb.org/docs/stable/clients/python/overview
|
|
28
|
-
Project-URL: Source, https://github.com/duckdb/duckdb
|
|
29
|
-
Project-URL: Issues, https://github.com/duckdb/duckdb/issues
|
|
28
|
+
Project-URL: Source, https://github.com/duckdb/duckdb-python
|
|
29
|
+
Project-URL: Issues, https://github.com/duckdb/duckdb-python/issues
|
|
30
30
|
Project-URL: Changelog, https://github.com/duckdb/duckdb/releases
|
|
31
31
|
Requires-Python: >=3.9.0
|
|
32
32
|
Provides-Extra: all
|
|
@@ -35,7 +35,7 @@ Requires-Dist: fsspec; extra == "all"
|
|
|
35
35
|
Requires-Dist: numpy; extra == "all"
|
|
36
36
|
Requires-Dist: pandas; extra == "all"
|
|
37
37
|
Requires-Dist: pyarrow; extra == "all"
|
|
38
|
-
Requires-Dist:
|
|
38
|
+
Requires-Dist: adbc-driver-manager; extra == "all"
|
|
39
39
|
Description-Content-Type: text/markdown
|
|
40
40
|
|
|
41
41
|
<div align="center">
|
|
@@ -47,8 +47,8 @@ Description-Content-Type: text/markdown
|
|
|
47
47
|
</div>
|
|
48
48
|
<br />
|
|
49
49
|
<p align="center">
|
|
50
|
-
<a href="https://discord.gg/tcvwpjfnZx"><img src="https://shields.io/discord/909674491309850675" alt="
|
|
51
|
-
<a href="https://pypi.org/project/duckdb/"><img src="https://img.shields.io/pypi/v/duckdb.svg" alt="
|
|
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
52
|
</p>
|
|
53
53
|
<br />
|
|
54
54
|
<p align="center">
|
|
@@ -70,7 +70,7 @@ Description-Content-Type: text/markdown
|
|
|
70
70
|
|
|
71
71
|
## Installation
|
|
72
72
|
|
|
73
|
-
Install the latest release of DuckDB directly from [
|
|
73
|
+
Install the latest release of DuckDB directly from [PyPI](https://pypi.org/project/duckdb/):
|
|
74
74
|
|
|
75
75
|
```bash
|
|
76
76
|
pip install duckdb
|
|
@@ -84,50 +84,58 @@ pip install 'duckdb[all]'
|
|
|
84
84
|
|
|
85
85
|
## Development
|
|
86
86
|
|
|
87
|
+
Start by <a href="https://github.com/duckdb/duckdb-python/fork"><svg height="16" viewBox="0 0 16 16" version="1.1" width="16">
|
|
88
|
+
<path fill-rule="evenodd" d="M5 3.25a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm0 2.122a2.25 2.25 0 10-1.5 0v.878A2.25 2.25 0 005.75 8.5h1.5v2.128a2.251 2.251 0 101.5 0V8.5h1.5a2.25 2.25 0 002.25-2.25v-.878a2.25 2.25 0 10-1.5 0v.878a.75.75 0 01-.75.75h-4.5A.75.75 0 015 6.25v-.878z"></path>
|
|
89
|
+
</svg>forking duckdb-python</a>.
|
|
90
|
+
|
|
87
91
|
### Cloning
|
|
88
92
|
|
|
89
|
-
|
|
93
|
+
After forking the duckdb-python repo we recommend you clone your fork as follows:
|
|
90
94
|
```shell
|
|
91
|
-
git clone --recurse-submodules
|
|
95
|
+
git clone --recurse-submodules $REPO_URL
|
|
96
|
+
git remote add upstream https://github.com/duckdb/duckdb-python.git
|
|
97
|
+
git fetch --all
|
|
92
98
|
```
|
|
93
99
|
|
|
94
|
-
... or, if
|
|
100
|
+
... or, if you have already cloned your fork:
|
|
95
101
|
```shell
|
|
96
|
-
git clone <your-repo>
|
|
97
|
-
cd <your-repo>
|
|
98
102
|
git submodule update --init --recursive
|
|
103
|
+
git remote add upstream https://github.com/duckdb/duckdb-python.git
|
|
104
|
+
git fetch --all
|
|
99
105
|
```
|
|
100
106
|
|
|
101
|
-
|
|
102
|
-
|
|
107
|
+
### Submodule update hook
|
|
108
|
+
|
|
109
|
+
If you'll be switching between branches that are have the submodule set to different refs, then make your life
|
|
110
|
+
easier and add the git hooks in the .githooks directory to your git hooks:
|
|
103
111
|
```shell
|
|
104
|
-
|
|
112
|
+
cp .githooks/post-checkout .git/hooks/
|
|
105
113
|
```
|
|
106
114
|
|
|
107
115
|
|
|
108
116
|
### Editable installs (general)
|
|
109
117
|
|
|
110
118
|
It's good to be aware of the following when performing an editable install:
|
|
111
|
-
- `uv sync` or `uv run [tool]` perform an editable install by default. We have
|
|
112
|
-
configured the project so that scikit-build-core will use a persistent build-dir, but since the build itself
|
|
113
|
-
happens in an isolated, ephemeral environment, cmake's paths will point to non-existing directories. CMake itself
|
|
119
|
+
- `uv sync` or `uv run [tool]` perform an editable install by default. We have
|
|
120
|
+
configured the project so that scikit-build-core will use a persistent build-dir, but since the build itself
|
|
121
|
+
happens in an isolated, ephemeral environment, cmake's paths will point to non-existing directories. CMake itself
|
|
114
122
|
will be missing.
|
|
115
|
-
- You should install all development dependencies, and then build the project without build isolation, in two separate
|
|
116
|
-
steps. After this you can happily keep building and running, as long as you don't forget to pass in the
|
|
123
|
+
- You should install all development dependencies, and then build the project without build isolation, in two separate
|
|
124
|
+
steps. After this you can happily keep building and running, as long as you don't forget to pass in the
|
|
117
125
|
`--no-build-isolation` flag.
|
|
118
126
|
|
|
119
127
|
```bash
|
|
120
128
|
# install all dev dependencies without building the project (needed once)
|
|
121
|
-
uv sync -p 3.
|
|
129
|
+
uv sync -p 3.11 --no-install-project
|
|
122
130
|
# build and install without build isolation
|
|
123
131
|
uv sync --no-build-isolation
|
|
124
132
|
```
|
|
125
133
|
|
|
126
134
|
### Editable installs (IDEs)
|
|
127
135
|
|
|
128
|
-
If you're using an IDE then life is a little simpler. You install build dependencies and the project in the two
|
|
129
|
-
steps outlined above, and from that point on you can rely on e.g. CLion's cmake capabilities to do incremental
|
|
130
|
-
compilation and editable rebuilds. This will skip scikit-build-core's build backend and all of uv's dependency
|
|
136
|
+
If you're using an IDE then life is a little simpler. You install build dependencies and the project in the two
|
|
137
|
+
steps outlined above, and from that point on you can rely on e.g. CLion's cmake capabilities to do incremental
|
|
138
|
+
compilation and editable rebuilds. This will skip scikit-build-core's build backend and all of uv's dependency
|
|
131
139
|
management, so for "real" builds you better revert to the CLI. However, this should work fine for coding and debugging.
|
|
132
140
|
|
|
133
141
|
|
|
@@ -171,7 +179,7 @@ uv run --no-build-isolation pytest ./tests --verbose --ignore=./tests/slow
|
|
|
171
179
|
COVERAGE=1 uv run --no-build-isolation coverage run -m pytest ./tests --verbose
|
|
172
180
|
```
|
|
173
181
|
|
|
174
|
-
The `COVERAGE` env var will compile the extension with `--coverage`, allowing us to collect coverage stats of C++
|
|
182
|
+
The `COVERAGE` env var will compile the extension with `--coverage`, allowing us to collect coverage stats of C++
|
|
175
183
|
code as well as Python code.
|
|
176
184
|
|
|
177
185
|
Check coverage for Python code:
|
|
@@ -180,7 +188,7 @@ uvx coverage html -d htmlcov-python
|
|
|
180
188
|
uvx coverage report --format=markdown
|
|
181
189
|
```
|
|
182
190
|
|
|
183
|
-
Check coverage for C++ code (note: this will clutter your project dir with html files, consider saving them in some
|
|
191
|
+
Check coverage for C++ code (note: this will clutter your project dir with html files, consider saving them in some
|
|
184
192
|
other place):
|
|
185
193
|
```bash
|
|
186
194
|
uvx gcovr \
|
|
@@ -201,11 +209,11 @@ uvx gcovr \
|
|
|
201
209
|
### Typechecking and linting
|
|
202
210
|
|
|
203
211
|
- We're not running any mypy typechecking tests at the moment
|
|
204
|
-
- We're not running any
|
|
212
|
+
- We're not running any Ruff / linting / formatting at the moment
|
|
205
213
|
|
|
206
214
|
### Cibuildwheel
|
|
207
215
|
|
|
208
|
-
You can run cibuildwheel locally for
|
|
216
|
+
You can run cibuildwheel locally for Linux. E.g. limited to Python 3.9:
|
|
209
217
|
```bash
|
|
210
218
|
CIBW_BUILD='cp39-*' uvx cibuildwheel --platform linux .
|
|
211
219
|
```
|
|
@@ -218,7 +226,7 @@ CIBW_BUILD='cp39-*' uvx cibuildwheel --platform linux .
|
|
|
218
226
|
### Tooling
|
|
219
227
|
|
|
220
228
|
This codebase is developed with the following tools:
|
|
221
|
-
- [Astral
|
|
229
|
+
- [Astral uv](https://docs.astral.sh/uv/) - for dependency management across all platforms we provide wheels for,
|
|
222
230
|
and for Python environment management. It will be hard to work on this codebase without having UV installed.
|
|
223
231
|
- [Scikit-build-core](https://scikit-build-core.readthedocs.io/en/latest/index.html) - the build backend for
|
|
224
232
|
building the extension. On the background, scikit-build-core uses cmake and ninja for compilation.
|
|
@@ -307,7 +315,7 @@ versioning scheme.
|
|
|
307
315
|
```toml
|
|
308
316
|
[tool.scikit-build]
|
|
309
317
|
metadata.version.provider = "scikit_build_core.metadata.setuptools_scm"
|
|
310
|
-
|
|
318
|
+
|
|
311
319
|
[tool.setuptools_scm]
|
|
312
320
|
version_scheme = "duckdb_packaging._setuptools_scm_version:version_scheme"
|
|
313
321
|
```
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
_duckdb.cpython-39-darwin.so,sha256=s3a18edRcq214i4eaSyNbx4VqhEJUimAy_IXhqvr6fw,80652336
|
|
2
|
+
duckdb/polars_io.py,sha256=rOY2k5SKDvFQfxgTdkngi70CY8HRaPk-NE3u4vzY-YE,10996
|
|
3
|
+
duckdb/_version.py,sha256=YED0DUA67R3YQhz3hY_0QA_goTaWK2HE2epopxDxrIc,844
|
|
4
|
+
duckdb/_dbapi_type_object.py,sha256=NW-m3YcpJwwpQ4UC9lj68eioUB1NbdmgaaQID6v9ecU,6980
|
|
5
|
+
duckdb/filesystem.py,sha256=GjKX8kNZrGTVtZkRru6pPO6-A5oWP1Dd8Qi89J62TqA,1299
|
|
6
|
+
duckdb/__init__.py,sha256=KyCqaPIZeRd3oZXP7F-H__YQKZ0mv7webvdpJHbHBKE,7507
|
|
7
|
+
duckdb/bytes_io_wrapper.py,sha256=ymaALp1QJQghb1dx8j_rLqGWz3oZ6ghK3jt2sjojEQI,3081
|
|
8
|
+
duckdb/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
|
+
duckdb/udf.py,sha256=J0uNT5nAyxesuRW_OFOpJoIucDIjRYbmaogh4K8519I,773
|
|
10
|
+
duckdb/experimental/__init__.py,sha256=RtBuXJuOPi6sh03OWG2Oor3yDEiVWV9q2aJQTNhSkcY,59
|
|
11
|
+
duckdb/experimental/spark/exception.py,sha256=lyWpHLPPwAlBUrJicU_F7flgNR2rO6rrhkd3-baMaHE,633
|
|
12
|
+
duckdb/experimental/spark/_typing.py,sha256=ucsD63ySqAZrmxXjbruUlRcI_B_N11YkaAubHE9rM4Q,1528
|
|
13
|
+
duckdb/experimental/spark/LICENSE,sha256=_1qknFLpgwYnWC6YVPp2gn0Zw7BAuFYWLRctcqnpUGc,13387
|
|
14
|
+
duckdb/experimental/spark/_globals.py,sha256=cOZjzthtbY9priskvpw-VJI4oQRJpteLcth1uunZmGs,2485
|
|
15
|
+
duckdb/experimental/spark/conf.py,sha256=TgbrtuZ8t1hIQ4qwAQJ1N9QBGqbRtbHRYQayyxvvneo,1590
|
|
16
|
+
duckdb/experimental/spark/__init__.py,sha256=n88g7UWukshEnqxhqYKIxuqeqBBIIPJSq_0LMAq3kvA,267
|
|
17
|
+
duckdb/experimental/spark/context.py,sha256=EON5ckQp9g1YgMVNBvHlOqANmt7Nv86iwWrh4o3XimE,6803
|
|
18
|
+
duckdb/experimental/spark/errors/error_classes.py,sha256=vxjHjulWrFy5yyHV2Vb4mRLrN6gyoDnTH5QfgtmuVdc,27272
|
|
19
|
+
duckdb/experimental/spark/errors/__init__.py,sha256=bZuHemepRWlGWXTsMS-h1H_II4GnNLQX00FhxybxJF8,2130
|
|
20
|
+
duckdb/experimental/spark/errors/utils.py,sha256=xGGTrtoo_Rj4vYu9knGLN0nxq7of2G8iwT-Lv9qslBI,4437
|
|
21
|
+
duckdb/experimental/spark/errors/exceptions/__init__.py,sha256=ptR0qQGsC3A1xqgNDj4zAMadcNHCCquukzQV0ytey9w,798
|
|
22
|
+
duckdb/experimental/spark/errors/exceptions/base.py,sha256=ttou4L-iCPYSYgdNMh0v8qtbo7swz3c_btva-9-jFxc,5146
|
|
23
|
+
duckdb/experimental/spark/sql/catalog.py,sha256=An1hDFhI7eyf2indn0bpJFjEE5QWFw-FmD-u03JMFTU,2508
|
|
24
|
+
duckdb/experimental/spark/sql/functions.py,sha256=rw9Iin_v9nDxRGzxSfn3-nMtXeSnWiesj4Ay4Qx2jEw,175142
|
|
25
|
+
duckdb/experimental/spark/sql/_typing.py,sha256=FnGgzj8uVF7TTrJ2X94IBo7XW_ezYQ8DYUwZ8wP-PIQ,2293
|
|
26
|
+
duckdb/experimental/spark/sql/dataframe.py,sha256=F_vUzIY7suX3y5pjv2bntSFF3-CTJ9M3od3dkcto2Cc,46451
|
|
27
|
+
duckdb/experimental/spark/sql/conf.py,sha256=DQ04ZoJu7IQX855p22eSZLMBz7aWhm8yYMWNPi6U5UY,763
|
|
28
|
+
duckdb/experimental/spark/sql/session.py,sha256=YKR42m92puFA-tqfmhbPLS6pYkyhbl61sxwI9C9Ybe0,9561
|
|
29
|
+
duckdb/experimental/spark/sql/type_utils.py,sha256=pbMyGdjaOj4yJE7jDgCXv85oMwUg4SjZoW8YOS4vWmY,3027
|
|
30
|
+
duckdb/experimental/spark/sql/__init__.py,sha256=Dsax7nLowynyH_bsZB7ZhFstOw386C9FggQ2MmkhMMA,270
|
|
31
|
+
duckdb/experimental/spark/sql/types.py,sha256=dvmMWAwaKAYuUauwK3B5m3-KFO-XNvktumDU1X5B9kk,41202
|
|
32
|
+
duckdb/experimental/spark/sql/readwriter.py,sha256=MEMBn9qX8Mj7i3rEOXVaZqIfbHB-AaFO1w32Ecvlal8,17495
|
|
33
|
+
duckdb/experimental/spark/sql/group.py,sha256=UHKCKwXB2M59Ki_tpsaC5s10ExqVdMLFVhncY5cR6do,13528
|
|
34
|
+
duckdb/experimental/spark/sql/udf.py,sha256=4I-HyLIZeMJEYzasC23xVDtS0FNdPDWXIAzQTWCx7hs,1173
|
|
35
|
+
duckdb/experimental/spark/sql/streaming.py,sha256=Re1v3PMEK93JalVXAE0oOMZM47m-YO75qlnwnJi0-C4,1068
|
|
36
|
+
duckdb/experimental/spark/sql/column.py,sha256=7bTZWlnCqS0avoP7Pg10Zop1cNjv-_Mlzu3y-Y4X8Fs,11093
|
|
37
|
+
duckdb/query_graph/__main__.py,sha256=HPiIRIas63s1m6IGQGwMqi9t4qr-922z3ESZDzPFLbc,11476
|
|
38
|
+
duckdb/value/__init__.py,sha256=0eVFfVd2aZXTZHFXcLZnFk8MftII4cMhRBBYt3Hm3LI,13
|
|
39
|
+
duckdb/value/constant/__init__.py,sha256=anBSU847CeWmtnsjc5VtM0B9urBko8TWnBiCB3XPWs4,5823
|
|
40
|
+
duckdb/sqltypes/__init__.py,sha256=07pg8Ykp905Mf-KqJtCfGBChLPit5nW6t7KEpAz9LR8,886
|
|
41
|
+
duckdb/typing/__init__.py,sha256=XmmRUTVgQMOobDmer7GmabnuFZ8t7rVfbtoJdK5uD6Y,1127
|
|
42
|
+
duckdb/functional/__init__.py,sha256=-WAPwJvoxdk2xQipz6unr8MwMyalnQ2aOUfMLhAPBw0,470
|
|
43
|
+
duckdb/func/__init__.py,sha256=oisXanDpKYjBG-tS1AMGVtodDGqKZspYbCLX5YlbWLQ,203
|
|
44
|
+
_duckdb-stubs/_func.pyi,sha256=1_39vmTVZZep_vSNVWVRBwLlz3YUk42yQeAvfZQXk1M,2086
|
|
45
|
+
_duckdb-stubs/_sqltypes.pyi,sha256=zJD-frBluEE2PrZccsHr9TjkTuWcCQLPe9FoG0YpKMI,2165
|
|
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=ccxCfpj_PCgwIT8op1roT6eHlYaVqdYRbIkYucugFAA,144
|
|
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
|
+
adbc_driver_duckdb/dbapi.py,sha256=Jg6JWpy2WUoew8XN-LU5BW7_RFDJQKmhaOYD7uPY6xo,3461
|
|
52
|
+
adbc_driver_duckdb/__init__.py,sha256=OIW5djWVmfo5fFFNzJLIPuWbAh0j5XbEoUG5OTmpSSs,1914
|