duckdb 0.5.1-dev52.0 → 0.5.1-dev56.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.5.1-dev52.0",
4
+ "version": "0.5.1-dev56.0",
5
5
  "description": "DuckDB node.js API",
6
6
  "gypfile": true,
7
7
  "dependencies": {
package/src/duckdb.cpp CHANGED
@@ -104322,18 +104322,12 @@ void SinkDataChunk(Vector *child_vector, SelectionVector &sel, idx_t offset_list
104322
104322
  static void ListSortFunction(DataChunk &args, ExpressionState &state, Vector &result) {
104323
104323
  D_ASSERT(args.ColumnCount() >= 1 && args.ColumnCount() <= 3);
104324
104324
  auto count = args.size();
104325
- Vector &lists = args.data[0];
104325
+ Vector &input_lists = args.data[0];
104326
104326
 
104327
104327
  result.SetVectorType(VectorType::FLAT_VECTOR);
104328
104328
  auto &result_validity = FlatVector::Validity(result);
104329
104329
 
104330
- for (auto &v : args.data) {
104331
- if (v.GetVectorType() != VectorType::FLAT_VECTOR && v.GetVectorType() != VectorType::CONSTANT_VECTOR) {
104332
- v.Flatten(count);
104333
- }
104334
- }
104335
-
104336
- if (lists.GetType().id() == LogicalTypeId::SQLNULL) {
104330
+ if (input_lists.GetType().id() == LogicalTypeId::SQLNULL) {
104337
104331
  result_validity.SetInvalid(0);
104338
104332
  return;
104339
104333
  }
@@ -104348,15 +104342,18 @@ static void ListSortFunction(DataChunk &args, ExpressionState &state, Vector &re
104348
104342
  LocalSortState local_sort_state;
104349
104343
  local_sort_state.Initialize(global_sort_state, buffer_manager);
104350
104344
 
104345
+ // this ensures that we do not change the order of the entries in the input chunk
104346
+ VectorOperations::Copy(input_lists, result, count, 0, 0);
104347
+
104351
104348
  // get the child vector
104352
- auto lists_size = ListVector::GetListSize(lists);
104353
- auto &child_vector = ListVector::GetEntry(lists);
104349
+ auto lists_size = ListVector::GetListSize(result);
104350
+ auto &child_vector = ListVector::GetEntry(result);
104354
104351
  UnifiedVectorFormat child_data;
104355
104352
  child_vector.ToUnifiedFormat(lists_size, child_data);
104356
104353
 
104357
104354
  // get the lists data
104358
104355
  UnifiedVectorFormat lists_data;
104359
- lists.ToUnifiedFormat(count, lists_data);
104356
+ result.ToUnifiedFormat(count, lists_data);
104360
104357
  auto list_entries = (list_entry_t *)lists_data.data;
104361
104358
 
104362
104359
  // create the lists_indices vector, this contains an element for each list's entry,
@@ -104453,8 +104450,6 @@ static void ListSortFunction(DataChunk &args, ExpressionState &state, Vector &re
104453
104450
  child_vector.Flatten(sel_sorted_idx);
104454
104451
  }
104455
104452
 
104456
- result.Reference(lists);
104457
-
104458
104453
  if (args.AllConstant()) {
104459
104454
  result.SetVectorType(VectorType::CONSTANT_VECTOR);
104460
104455
  }
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 "626cd542a"
15
- #define DUCKDB_VERSION "v0.5.1-dev52"
14
+ #define DUCKDB_SOURCE_ID "c96d09d7b"
15
+ #define DUCKDB_VERSION "v0.5.1-dev56"
16
16
  //===----------------------------------------------------------------------===//
17
17
  // DuckDB
18
18
  //