duckdb 0.3.3-dev1282.0 → 0.3.3-dev1291.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "duckdb",
3
3
  "main": "./lib/duckdb.js",
4
- "version": "0.3.3-dev1282.0",
4
+ "version": "0.3.3-dev1291.0",
5
5
  "description": "DuckDB node.js API",
6
6
  "gypfile": true,
7
7
  "dependencies": {
package/src/duckdb.cpp CHANGED
@@ -96977,9 +96977,14 @@ unique_ptr<FunctionData> ArrowTableFunction::ArrowScanBind(ClientContext &contex
96977
96977
  uintptr_t stream_factory_ptr,
96978
96978
  std::pair<std::unordered_map<idx_t, string>, std::vector<string>> & project_columns,
96979
96979
  TableFilterCollection * filters);
96980
+
96981
+ typedef void (*stream_factory_get_schema_t)(uintptr_t stream_factory_ptr, ArrowSchemaWrapper & schema);
96982
+
96980
96983
  auto stream_factory_ptr = input.inputs[0].GetPointer();
96981
96984
  auto stream_factory_produce = (stream_factory_produce_t)input.inputs[1].GetPointer();
96982
- auto rows_per_thread = input.inputs[2].GetValue<uint64_t>();
96985
+ auto stream_factory_get_schema = (stream_factory_get_schema_t)input.inputs[2].GetPointer();
96986
+ auto rows_per_thread = input.inputs[3].GetValue<uint64_t>();
96987
+
96983
96988
  std::pair<std::unordered_map<idx_t, string>, std::vector<string>> project_columns;
96984
96989
  #ifndef DUCKDB_NO_THREADS
96985
96990
 
@@ -96989,15 +96994,7 @@ unique_ptr<FunctionData> ArrowTableFunction::ArrowScanBind(ClientContext &contex
96989
96994
  auto res = make_unique<ArrowScanFunctionData>(rows_per_thread, stream_factory_produce, stream_factory_ptr);
96990
96995
  #endif
96991
96996
  auto &data = *res;
96992
- auto stream = stream_factory_produce(stream_factory_ptr, project_columns, nullptr);
96993
-
96994
- data.number_of_rows = stream->number_of_rows;
96995
- if (!stream) {
96996
- throw InvalidInputException("arrow_scan: NULL pointer passed");
96997
- }
96998
-
96999
- stream->GetSchema(data.schema_root);
97000
-
96997
+ stream_factory_get_schema(stream_factory_ptr, data.schema_root);
97001
96998
  for (idx_t col_idx = 0; col_idx < (idx_t)data.schema_root.arrow_schema.n_children; col_idx++) {
97002
96999
  auto &schema = *data.schema_root.arrow_schema.children[col_idx];
97003
97000
  if (!schema.release) {
@@ -97907,11 +97904,11 @@ double ArrowTableFunction::ArrowProgress(ClientContext &context, const FunctionD
97907
97904
 
97908
97905
  void ArrowTableFunction::RegisterFunction(BuiltinFunctions &set) {
97909
97906
  TableFunctionSet arrow("arrow_scan");
97910
- arrow.AddFunction(TableFunction({LogicalType::POINTER, LogicalType::POINTER, LogicalType::UBIGINT},
97911
- ArrowScanFunction, ArrowScanBind, ArrowScanInit, nullptr, nullptr, nullptr,
97912
- ArrowScanCardinality, nullptr, nullptr, ArrowScanMaxThreads,
97913
- ArrowScanInitParallelState, ArrowScanFunctionParallel, ArrowScanParallelInit,
97914
- ArrowScanParallelStateNext, true, true, ArrowProgress));
97907
+ arrow.AddFunction(
97908
+ TableFunction({LogicalType::POINTER, LogicalType::POINTER, LogicalType::POINTER, LogicalType::UBIGINT},
97909
+ ArrowScanFunction, ArrowScanBind, ArrowScanInit, nullptr, nullptr, nullptr, ArrowScanCardinality,
97910
+ nullptr, nullptr, ArrowScanMaxThreads, ArrowScanInitParallelState, ArrowScanFunctionParallel,
97911
+ ArrowScanParallelInit, ArrowScanParallelStateNext, true, true, ArrowProgress));
97915
97912
  set.AddFunction(arrow);
97916
97913
  }
97917
97914
 
package/src/duckdb.hpp CHANGED
@@ -11,8 +11,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
11
11
  #pragma once
12
12
  #define DUCKDB_AMALGAMATION 1
13
13
  #define DUCKDB_AMALGAMATION_EXTENDED 1
14
- #define DUCKDB_SOURCE_ID "a52157e01"
15
- #define DUCKDB_VERSION "v0.3.3-dev1282"
14
+ #define DUCKDB_SOURCE_ID "261c21b49"
15
+ #define DUCKDB_VERSION "v0.3.3-dev1291"
16
16
  //===----------------------------------------------------------------------===//
17
17
  // DuckDB
18
18
  //