duckdb 0.4.1-dev2371.0 → 0.4.1-dev2374.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.4.1-dev2371.0",
4
+ "version": "0.4.1-dev2374.0",
5
5
  "description": "DuckDB node.js API",
6
6
  "gypfile": true,
7
7
  "dependencies": {
package/src/duckdb.cpp CHANGED
@@ -114809,10 +114809,8 @@ typedef unique_ptr<ArrowArrayStreamWrapper> (*stream_factory_produce_t)(uintptr_
114809
114809
  typedef void (*stream_factory_get_schema_t)(uintptr_t stream_factory_ptr, ArrowSchemaWrapper &schema);
114810
114810
 
114811
114811
  struct ArrowScanFunctionData : public PyTableFunctionData {
114812
- ArrowScanFunctionData(idx_t rows_per_thread_p, stream_factory_produce_t scanner_producer_p,
114813
- uintptr_t stream_factory_ptr_p)
114814
- : lines_read(0), rows_per_thread(rows_per_thread_p), stream_factory_ptr(stream_factory_ptr_p),
114815
- scanner_producer(scanner_producer_p), number_of_rows(0) {
114812
+ ArrowScanFunctionData(stream_factory_produce_t scanner_producer_p, uintptr_t stream_factory_ptr_p)
114813
+ : lines_read(0), stream_factory_ptr(stream_factory_ptr_p), scanner_producer(scanner_producer_p) {
114816
114814
  }
114817
114815
  //! This holds the original list type (col_idx, [ArrowListType,size])
114818
114816
  unordered_map<idx_t, unique_ptr<ArrowConvertData>> arrow_convert_data;
@@ -114823,8 +114821,6 @@ struct ArrowScanFunctionData : public PyTableFunctionData {
114823
114821
  uintptr_t stream_factory_ptr;
114824
114822
  //! Pointer to the scanner factory produce
114825
114823
  stream_factory_produce_t scanner_producer;
114826
- //! Number of rows (Used in cardinality and progress bar)
114827
- int64_t number_of_rows;
114828
114824
  };
114829
114825
 
114830
114826
  struct ArrowScanLocalState : public LocalTableFunctionState {
@@ -115080,9 +115076,8 @@ unique_ptr<FunctionData> ArrowTableFunction::ArrowScanBind(ClientContext &contex
115080
115076
  auto stream_factory_ptr = input.inputs[0].GetPointer();
115081
115077
  auto stream_factory_produce = (stream_factory_produce_t)input.inputs[1].GetPointer();
115082
115078
  auto stream_factory_get_schema = (stream_factory_get_schema_t)input.inputs[2].GetPointer();
115083
- auto rows_per_thread = input.inputs[3].GetValue<uint64_t>();
115084
115079
 
115085
- auto res = make_unique<ArrowScanFunctionData>(rows_per_thread, stream_factory_produce, stream_factory_ptr);
115080
+ auto res = make_unique<ArrowScanFunctionData>(stream_factory_produce, stream_factory_ptr);
115086
115081
 
115087
115082
  auto &data = *res;
115088
115083
  stream_factory_get_schema(stream_factory_ptr, data.schema_root);
@@ -115127,11 +115122,7 @@ unique_ptr<ArrowArrayStreamWrapper> ProduceArrowScan(const ArrowScanFunctionData
115127
115122
  }
115128
115123
 
115129
115124
  idx_t ArrowTableFunction::ArrowScanMaxThreads(ClientContext &context, const FunctionData *bind_data_p) {
115130
- auto &bind_data = (const ArrowScanFunctionData &)*bind_data_p;
115131
- if (bind_data.number_of_rows <= 0 || ClientConfig::GetConfig(context).verify_parallelism) {
115132
- return context.db->NumberOfThreads();
115133
- }
115134
- return ((bind_data.number_of_rows + bind_data.rows_per_thread - 1) / bind_data.rows_per_thread) + 1;
115125
+ return context.db->NumberOfThreads();
115135
115126
  }
115136
115127
 
115137
115128
  bool ArrowScanParallelStateNext(ClientContext &context, const FunctionData *bind_data_p, ArrowScanLocalState &state,
@@ -115197,28 +115188,15 @@ void ArrowTableFunction::ArrowScanFunction(ClientContext &context, TableFunction
115197
115188
  }
115198
115189
 
115199
115190
  unique_ptr<NodeStatistics> ArrowTableFunction::ArrowScanCardinality(ClientContext &context, const FunctionData *data) {
115200
- auto &bind_data = (ArrowScanFunctionData &)*data;
115201
- return make_unique<NodeStatistics>(bind_data.number_of_rows, bind_data.number_of_rows);
115202
- }
115203
-
115204
- double ArrowTableFunction::ArrowProgress(ClientContext &context, const FunctionData *bind_data_p,
115205
- const GlobalTableFunctionState *global_state) {
115206
- auto &bind_data = (const ArrowScanFunctionData &)*bind_data_p;
115207
- if (bind_data.number_of_rows == 0) {
115208
- return 100;
115209
- }
115210
- auto percentage = bind_data.lines_read * 100.0 / bind_data.number_of_rows;
115211
- return percentage;
115191
+ return make_unique<NodeStatistics>();
115212
115192
  }
115213
115193
 
115214
115194
  void ArrowTableFunction::RegisterFunction(BuiltinFunctions &set) {
115215
- TableFunction arrow("arrow_scan",
115216
- {LogicalType::POINTER, LogicalType::POINTER, LogicalType::POINTER, LogicalType::UBIGINT},
115195
+ TableFunction arrow("arrow_scan", {LogicalType::POINTER, LogicalType::POINTER, LogicalType::POINTER},
115217
115196
  ArrowScanFunction, ArrowScanBind, ArrowScanInitGlobal, ArrowScanInitLocal);
115218
115197
  arrow.cardinality = ArrowScanCardinality;
115219
115198
  arrow.projection_pushdown = true;
115220
115199
  arrow.filter_pushdown = true;
115221
- arrow.table_scan_progress = ArrowProgress;
115222
115200
  set.AddFunction(arrow);
115223
115201
  }
115224
115202
 
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 "3825e0ee7"
15
- #define DUCKDB_VERSION "v0.4.1-dev2371"
14
+ #define DUCKDB_SOURCE_ID "0d2d7930d"
15
+ #define DUCKDB_VERSION "v0.4.1-dev2374"
16
16
  //===----------------------------------------------------------------------===//
17
17
  // DuckDB
18
18
  //