duckdb 0.3.3-dev839.0 → 0.3.3-dev849.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-dev839.0",
4
+ "version": "0.3.3-dev849.0",
5
5
  "description": "DuckDB node.js API",
6
6
  "gypfile": true,
7
7
  "dependencies": {
package/src/duckdb.cpp CHANGED
@@ -76299,10 +76299,12 @@ static void ListCombineFunction(Vector &state, Vector &combined, idx_t count) {
76299
76299
  auto states_ptr = (ListAggState **)sdata.data;
76300
76300
 
76301
76301
  auto combined_ptr = FlatVector::GetData<ListAggState *>(combined);
76302
-
76303
76302
  for (idx_t i = 0; i < count; i++) {
76304
76303
  auto state = states_ptr[sdata.sel->get_index(i)];
76305
- D_ASSERT(state->list_vector);
76304
+ if (!state->list_vector) {
76305
+ // NULL, no need to append.
76306
+ continue;
76307
+ }
76306
76308
  if (!combined_ptr[i]->list_vector) {
76307
76309
  combined_ptr[i]->list_vector = new Vector(state->list_vector->GetType());
76308
76310
  }
@@ -76320,17 +76322,18 @@ static void ListFinalize(Vector &state_vector, FunctionData *, Vector &result, i
76320
76322
 
76321
76323
  auto &mask = FlatVector::Validity(result);
76322
76324
  size_t total_len = ListVector::GetListSize(result);
76325
+
76323
76326
  for (idx_t i = 0; i < count; i++) {
76324
76327
  auto state = states[sdata.sel->get_index(i)];
76328
+ const auto rid = i + offset;
76325
76329
  if (!state->list_vector) {
76326
- mask.SetInvalid(i);
76330
+ mask.SetInvalid(rid);
76327
76331
  continue;
76328
76332
  }
76329
- D_ASSERT(state->list_vector);
76333
+
76330
76334
  auto list_struct_data = FlatVector::GetData<list_entry_t>(result);
76331
76335
  auto &state_lv = *state->list_vector;
76332
76336
  auto state_lv_count = ListVector::GetListSize(state_lv);
76333
- const auto rid = i + offset;
76334
76337
  list_struct_data[rid].length = state_lv_count;
76335
76338
  list_struct_data[rid].offset = total_len;
76336
76339
  total_len += state_lv_count;
@@ -128204,12 +128207,30 @@ bool Pipeline::GetProgressInternal(ClientContext &context, PhysicalOperator *op,
128204
128207
  current_percentage = get.function.table_scan_progress(context, get.bind_data.get());
128205
128208
  return true;
128206
128209
  }
128207
- //! If the table_scan_progress is not implemented it means we don't support this function yet in the progress
128208
- //! bar
128210
+ // If the table_scan_progress is not implemented it means we don't support this function yet in the progress
128211
+ // bar
128209
128212
  return false;
128210
128213
  }
128211
- default:
128212
- return false;
128214
+ // If it is not a table scan we go down on all children until we reach the leaf operators
128215
+ default: {
128216
+ vector<idx_t> progress;
128217
+ vector<idx_t> cardinality;
128218
+ double total_cardinality = 0;
128219
+ current_percentage = 0;
128220
+ for (auto &op_child : op->children) {
128221
+ double child_percentage = 0;
128222
+ if (!GetProgressInternal(context, op_child.get(), child_percentage)) {
128223
+ return false;
128224
+ }
128225
+ progress.push_back(child_percentage);
128226
+ cardinality.push_back(op_child->estimated_cardinality);
128227
+ total_cardinality += op_child->estimated_cardinality;
128228
+ }
128229
+ for (size_t i = 0; i < progress.size(); i++) {
128230
+ current_percentage += progress[i] * cardinality[i] / total_cardinality;
128231
+ }
128232
+ return true;
128233
+ }
128213
128234
  }
128214
128235
  }
128215
128236
  // LCOV_EXCL_STOP
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 "4d7d868d1"
15
- #define DUCKDB_VERSION "v0.3.3-dev839"
14
+ #define DUCKDB_SOURCE_ID "b65122828"
15
+ #define DUCKDB_VERSION "v0.3.3-dev849"
16
16
  //===----------------------------------------------------------------------===//
17
17
  // DuckDB
18
18
  //