duckdb 0.5.1-dev56.0 → 0.5.1-dev61.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-dev56.0",
4
+ "version": "0.5.1-dev61.0",
5
5
  "description": "DuckDB node.js API",
6
6
  "gypfile": true,
7
7
  "dependencies": {
package/src/duckdb.cpp CHANGED
@@ -35676,7 +35676,10 @@ struct SortConstants {
35676
35676
 
35677
35677
  struct SortLayout {
35678
35678
  public:
35679
+ SortLayout() {
35680
+ }
35679
35681
  explicit SortLayout(const vector<BoundOrderByNode> &orders);
35682
+ SortLayout GetPrefixComparisonLayout(idx_t num_prefix_cols) const;
35680
35683
 
35681
35684
  public:
35682
35685
  idx_t column_count;
@@ -37327,6 +37330,32 @@ SortLayout::SortLayout(const vector<BoundOrderByNode> &orders)
37327
37330
  blob_layout.Initialize(blob_layout_types);
37328
37331
  }
37329
37332
 
37333
+ SortLayout SortLayout::GetPrefixComparisonLayout(idx_t num_prefix_cols) const {
37334
+ SortLayout result;
37335
+ result.column_count = num_prefix_cols;
37336
+ result.all_constant = true;
37337
+ result.comparison_size = 0;
37338
+ for (idx_t col_idx = 0; col_idx < num_prefix_cols; col_idx++) {
37339
+ result.order_types.push_back(order_types[col_idx]);
37340
+ result.order_by_null_types.push_back(order_by_null_types[col_idx]);
37341
+ result.logical_types.push_back(logical_types[col_idx]);
37342
+
37343
+ result.all_constant = result.all_constant && constant_size[col_idx];
37344
+ result.constant_size.push_back(constant_size[col_idx]);
37345
+
37346
+ result.comparison_size += column_sizes[col_idx];
37347
+ result.column_sizes.push_back(column_sizes[col_idx]);
37348
+
37349
+ result.prefix_lengths.push_back(prefix_lengths[col_idx]);
37350
+ result.stats.push_back(stats[col_idx]);
37351
+ result.has_null.push_back(has_null[col_idx]);
37352
+ }
37353
+ result.entry_size = entry_size;
37354
+ result.blob_layout = blob_layout;
37355
+ result.sorting_to_blob_col = sorting_to_blob_col;
37356
+ return result;
37357
+ }
37358
+
37330
37359
  LocalSortState::LocalSortState() : initialized(false) {
37331
37360
  }
37332
37361
 
@@ -64930,12 +64959,14 @@ public:
64930
64959
 
64931
64960
  WindowGlobalHashGroup(BufferManager &buffer_manager, const Orders &partitions, const Orders &orders,
64932
64961
  const Types &payload_types, idx_t max_mem, bool external)
64933
- : memory_per_thread(max_mem), count(0), partition_layout(partitions) {
64962
+ : memory_per_thread(max_mem), count(0) {
64934
64963
 
64935
64964
  RowLayout payload_layout;
64936
64965
  payload_layout.Initialize(payload_types);
64937
64966
  global_sort = make_unique<GlobalSortState>(buffer_manager, orders, payload_layout);
64938
64967
  global_sort->external = external;
64968
+
64969
+ partition_layout = global_sort->sort_layout.GetPrefixComparisonLayout(partitions.size());
64939
64970
  }
64940
64971
 
64941
64972
  void Combine(LocalSortState &local_sort) {
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 "c96d09d7b"
15
- #define DUCKDB_VERSION "v0.5.1-dev56"
14
+ #define DUCKDB_SOURCE_ID "8a4d0609c"
15
+ #define DUCKDB_VERSION "v0.5.1-dev61"
16
16
  //===----------------------------------------------------------------------===//
17
17
  // DuckDB
18
18
  //