duckdb 0.6.2-dev490.0 → 0.6.2-dev499.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
@@ -2,7 +2,7 @@
2
2
  "name": "duckdb",
3
3
  "main": "./lib/duckdb.js",
4
4
  "types": "./lib/duckdb.d.ts",
5
- "version": "0.6.2-dev490.0",
5
+ "version": "0.6.2-dev499.0",
6
6
  "description": "DuckDB node.js API",
7
7
  "gypfile": true,
8
8
  "dependencies": {
package/src/duckdb.cpp CHANGED
@@ -156976,6 +156976,7 @@ private:
156976
156976
  void UpdateDPTree(JoinNode *new_plan);
156977
156977
 
156978
156978
  void UpdateJoinNodesInFullPlan(JoinNode *node);
156979
+ bool NodeInFullPlan(JoinNode *node);
156979
156980
 
156980
156981
  std::pair<JoinRelationSet *, unique_ptr<LogicalOperator>>
156981
156982
  GenerateJoins(vector<unique_ptr<LogicalOperator>> &extracted_relations, JoinNode *node);
@@ -157706,7 +157707,6 @@ string JoinNode::ToString() {
157706
157707
 
157707
157708
 
157708
157709
 
157709
-
157710
157710
  #include <algorithm>
157711
157711
 
157712
157712
  namespace std {
@@ -157975,6 +157975,10 @@ unique_ptr<JoinNode> JoinOrderOptimizer::CreateJoinTree(JoinRelationSet *set,
157975
157975
  return result;
157976
157976
  }
157977
157977
 
157978
+ bool JoinOrderOptimizer::NodeInFullPlan(JoinNode *node) {
157979
+ return join_nodes_in_full_plan.find(node->set->ToString()) != join_nodes_in_full_plan.end();
157980
+ }
157981
+
157978
157982
  void JoinOrderOptimizer::UpdateJoinNodesInFullPlan(JoinNode *node) {
157979
157983
  if (!node) {
157980
157984
  return;
@@ -158205,7 +158209,7 @@ static vector<unordered_set<idx_t>> AddSuperSets(vector<unordered_set<idx_t>> cu
158205
158209
  }
158206
158210
 
158207
158211
  // works by first creating all sets with cardinality 1
158208
- // then iterates over each previously create group of subsets and will only add a neighbor if the neighbor
158212
+ // then iterates over each previously created group of subsets and will only add a neighbor if the neighbor
158209
158213
  // is greater than all relations in the set.
158210
158214
  static vector<unordered_set<idx_t>> GetAllNeighborSets(JoinRelationSet *new_set, unordered_set<idx_t> &exclusion_set,
158211
158215
  vector<idx_t> neighbors) {
@@ -158241,6 +158245,11 @@ static vector<unordered_set<idx_t>> GetAllNeighborSets(JoinRelationSet *new_set,
158241
158245
  }
158242
158246
 
158243
158247
  void JoinOrderOptimizer::UpdateDPTree(JoinNode *new_plan) {
158248
+ if (!NodeInFullPlan(new_plan)) {
158249
+ // if the new node is not in the full plan, feel free to return
158250
+ // because you won't be updating the full plan.
158251
+ return;
158252
+ }
158244
158253
  auto new_set = new_plan->set;
158245
158254
  // now update every plan that uses this plan
158246
158255
  unordered_set<idx_t> exclusion_set;
@@ -158302,6 +158311,7 @@ void JoinOrderOptimizer::SolveJoinOrderApproximately() {
158302
158311
  // update the DP tree in case a plan created by the DP algorithm uses the node
158303
158312
  // that was potentially just updated by EmitPair. You will get a use-after-free
158304
158313
  // error if future plans rely on the old node that was just replaced.
158314
+ // if node in FullPath, then updateDP tree.
158305
158315
  UpdateDPTree(node);
158306
158316
 
158307
158317
  if (!best_connection || node->GetCost() < best_connection->GetCost()) {
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 "f6311a30e6"
15
- #define DUCKDB_VERSION "v0.6.2-dev490"
14
+ #define DUCKDB_SOURCE_ID "bb5cb7f51e"
15
+ #define DUCKDB_VERSION "v0.6.2-dev499"
16
16
  //===----------------------------------------------------------------------===//
17
17
  // DuckDB
18
18
  //