duckdb 0.8.2-dev2842.0 → 0.8.2-dev3007.0
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.
- package/binding.gyp +1 -0
- package/package.json +1 -1
- package/src/duckdb/extension/json/include/json_deserializer.hpp +1 -1
- package/src/duckdb/extension/json/include/json_serializer.hpp +1 -1
- package/src/duckdb/extension/json/json_deserializer.cpp +7 -5
- package/src/duckdb/extension/json/json_serializer.cpp +2 -3
- package/src/duckdb/src/common/adbc/adbc.cpp +400 -145
- package/src/duckdb/src/common/adbc/driver_manager.cpp +79 -31
- package/src/duckdb/src/common/adbc/nanoarrow/allocator.cpp +57 -0
- package/src/duckdb/src/common/adbc/nanoarrow/metadata.cpp +121 -0
- package/src/duckdb/src/common/adbc/nanoarrow/schema.cpp +474 -0
- package/src/duckdb/src/common/adbc/nanoarrow/single_batch_array_stream.cpp +84 -0
- package/src/duckdb/src/common/arrow/arrow_converter.cpp +4 -2
- package/src/duckdb/src/common/multi_file_reader.cpp +6 -0
- package/src/duckdb/src/execution/window_executor.cpp +5 -8
- package/src/duckdb/src/function/table/version/pragma_version.cpp +2 -2
- package/src/duckdb/src/include/duckdb/common/adbc/adbc.h +1 -0
- package/src/duckdb/src/include/duckdb/common/adbc/adbc.hpp +3 -3
- package/src/duckdb/src/include/duckdb/common/adbc/single_batch_array_stream.hpp +16 -0
- package/src/duckdb/src/include/duckdb/common/arrow/arrow_appender.hpp +1 -2
- package/src/duckdb/src/include/duckdb/common/arrow/arrow_converter.hpp +0 -2
- package/src/duckdb/src/include/duckdb/common/arrow/nanoarrow/nanoarrow.h +462 -0
- package/src/duckdb/src/include/duckdb/common/arrow/nanoarrow/nanoarrow.hpp +14 -0
- package/src/duckdb/src/include/duckdb/common/types/data_chunk.hpp +0 -2
- package/src/duckdb/src/include/duckdb/main/chunk_scan_state.hpp +2 -4
- package/src/duckdb/src/include/duckdb.h +16 -0
- package/src/duckdb/src/main/capi/arrow-c.cpp +41 -0
- package/src/duckdb/src/main/capi/prepared-c.cpp +60 -30
- package/src/duckdb/src/main/chunk_scan_state.cpp +6 -0
- package/src/duckdb/src/main/client_context.cpp +1 -1
- package/src/duckdb/src/optimizer/topn_optimizer.cpp +7 -0
- package/src/duckdb/src/parser/transform/constraint/transform_constraint.cpp +55 -38
- package/src/duckdb/src/storage/compression/bitpacking.cpp +1 -1
- package/src/duckdb/ub_src_common_adbc_nanoarrow.cpp +8 -0
- package/src/duckdb_node.hpp +1 -0
- package/src/statement.cpp +1 -1
package/binding.gyp
CHANGED
@@ -13,6 +13,7 @@
|
|
13
13
|
"src/duckdb/ub_src_catalog_catalog_entry.cpp",
|
14
14
|
"src/duckdb/ub_src_catalog_default.cpp",
|
15
15
|
"src/duckdb/ub_src_common_adbc.cpp",
|
16
|
+
"src/duckdb/ub_src_common_adbc_nanoarrow.cpp",
|
16
17
|
"src/duckdb/ub_src_common.cpp",
|
17
18
|
"src/duckdb/ub_src_common_arrow_appender.cpp",
|
18
19
|
"src/duckdb/ub_src_common_arrow.cpp",
|
package/package.json
CHANGED
@@ -48,7 +48,7 @@ private:
|
|
48
48
|
void ThrowTypeError(yyjson_val *val, const char *expected);
|
49
49
|
|
50
50
|
// Set the 'tag' of the property to read
|
51
|
-
void SetTag(const field_id_t
|
51
|
+
void SetTag(const field_id_t, const char *tag) final;
|
52
52
|
|
53
53
|
//===--------------------------------------------------------------------===//
|
54
54
|
// Nested Types Hooks
|
@@ -42,7 +42,7 @@ public:
|
|
42
42
|
return stack.front();
|
43
43
|
};
|
44
44
|
|
45
|
-
void SetTag(const field_id_t
|
45
|
+
void SetTag(const field_id_t, const char *tag) final;
|
46
46
|
|
47
47
|
//===--------------------------------------------------------------------===//
|
48
48
|
// Nested Types Hooks
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
namespace duckdb {
|
5
5
|
|
6
|
-
void JsonDeserializer::SetTag(const field_id_t
|
6
|
+
void JsonDeserializer::SetTag(const field_id_t, const char *tag) {
|
7
7
|
current_tag = tag;
|
8
8
|
}
|
9
9
|
|
@@ -43,8 +43,10 @@ void JsonDeserializer::ThrowTypeError(yyjson_val *val, const char *expected) {
|
|
43
43
|
if (yyjson_is_obj(parent.val)) {
|
44
44
|
auto msg =
|
45
45
|
StringUtil::Format("property '%s' expected type '%s', but got type: '%s'", current_tag, expected, actual);
|
46
|
+
throw ParserException(msg);
|
46
47
|
} else if (yyjson_is_arr(parent.val)) {
|
47
48
|
auto msg = StringUtil::Format("Sequence expect child of type '%s', but got type: %s", expected, actual);
|
49
|
+
throw ParserException(msg);
|
48
50
|
} else {
|
49
51
|
// unreachable?
|
50
52
|
throw InternalException("cannot get nested value from non object or array-type");
|
@@ -178,7 +180,7 @@ bool JsonDeserializer::ReadBool() {
|
|
178
180
|
|
179
181
|
int8_t JsonDeserializer::ReadSignedInt8() {
|
180
182
|
auto val = GetNextValue();
|
181
|
-
if (!
|
183
|
+
if (!yyjson_is_int(val)) {
|
182
184
|
ThrowTypeError(val, "int8_t");
|
183
185
|
}
|
184
186
|
return yyjson_get_sint(val);
|
@@ -194,7 +196,7 @@ uint8_t JsonDeserializer::ReadUnsignedInt8() {
|
|
194
196
|
|
195
197
|
int16_t JsonDeserializer::ReadSignedInt16() {
|
196
198
|
auto val = GetNextValue();
|
197
|
-
if (!
|
199
|
+
if (!yyjson_is_int(val)) {
|
198
200
|
ThrowTypeError(val, "int16_t");
|
199
201
|
}
|
200
202
|
return yyjson_get_sint(val);
|
@@ -210,7 +212,7 @@ uint16_t JsonDeserializer::ReadUnsignedInt16() {
|
|
210
212
|
|
211
213
|
int32_t JsonDeserializer::ReadSignedInt32() {
|
212
214
|
auto val = GetNextValue();
|
213
|
-
if (!
|
215
|
+
if (!yyjson_is_int(val)) {
|
214
216
|
ThrowTypeError(val, "int32_t");
|
215
217
|
}
|
216
218
|
return yyjson_get_sint(val);
|
@@ -226,7 +228,7 @@ uint32_t JsonDeserializer::ReadUnsignedInt32() {
|
|
226
228
|
|
227
229
|
int64_t JsonDeserializer::ReadSignedInt64() {
|
228
230
|
auto val = GetNextValue();
|
229
|
-
if (!
|
231
|
+
if (!yyjson_is_int(val)) {
|
230
232
|
ThrowTypeError(val, "int64_t");
|
231
233
|
}
|
232
234
|
return yyjson_get_sint(val);
|
@@ -19,8 +19,7 @@ void JsonSerializer::PushValue(yyjson_mut_val *val) {
|
|
19
19
|
}
|
20
20
|
}
|
21
21
|
|
22
|
-
void JsonSerializer::SetTag(const field_id_t
|
23
|
-
(void)field_id;
|
22
|
+
void JsonSerializer::SetTag(const field_id_t, const char *tag) {
|
24
23
|
current_tag = yyjson_mut_strcpy(doc, tag);
|
25
24
|
}
|
26
25
|
|
@@ -173,7 +172,7 @@ void JsonSerializer::WriteValue(uint32_t value) {
|
|
173
172
|
}
|
174
173
|
|
175
174
|
void JsonSerializer::WriteValue(int32_t value) {
|
176
|
-
auto val =
|
175
|
+
auto val = yyjson_mut_sint(doc, value);
|
177
176
|
PushValue(val);
|
178
177
|
}
|
179
178
|
|