duckdb 0.3.5-dev577.0 → 0.3.5-dev584.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 +1 -1
- package/src/duckdb.cpp +33 -4
- package/src/duckdb.hpp +4 -2
- package/src/parquet-amalgamation.cpp +36947 -36947
package/package.json
CHANGED
package/src/duckdb.cpp
CHANGED
|
@@ -114193,6 +114193,15 @@ struct DebugForceExternal {
|
|
|
114193
114193
|
static Value GetSetting(ClientContext &context);
|
|
114194
114194
|
};
|
|
114195
114195
|
|
|
114196
|
+
struct DebugForceNoCrossProduct {
|
|
114197
|
+
static constexpr const char *Name = "debug_force_no_cross_product";
|
|
114198
|
+
static constexpr const char *Description =
|
|
114199
|
+
"DEBUG SETTING: Force disable cross product generation when hyper graph isn't connected, used for testing";
|
|
114200
|
+
static constexpr const LogicalTypeId InputType = LogicalTypeId::BOOLEAN;
|
|
114201
|
+
static void SetLocal(ClientContext &context, const Value ¶meter);
|
|
114202
|
+
static Value GetSetting(ClientContext &context);
|
|
114203
|
+
};
|
|
114204
|
+
|
|
114196
114205
|
struct DebugManyFreeListBlocks {
|
|
114197
114206
|
static constexpr const char *Name = "debug_many_free_list_blocks";
|
|
114198
114207
|
static constexpr const char *Description = "DEBUG SETTING: add additional blocks to the free list";
|
|
@@ -114440,6 +114449,7 @@ static ConfigurationOption internal_options[] = {DUCKDB_GLOBAL(AccessModeSetting
|
|
|
114440
114449
|
DUCKDB_GLOBAL(CheckpointThresholdSetting),
|
|
114441
114450
|
DUCKDB_GLOBAL(DebugCheckpointAbort),
|
|
114442
114451
|
DUCKDB_LOCAL(DebugForceExternal),
|
|
114452
|
+
DUCKDB_LOCAL(DebugForceNoCrossProduct),
|
|
114443
114453
|
DUCKDB_GLOBAL(DebugManyFreeListBlocks),
|
|
114444
114454
|
DUCKDB_GLOBAL(DebugWindowMode),
|
|
114445
114455
|
DUCKDB_GLOBAL_LOCAL(DefaultCollationSetting),
|
|
@@ -127680,6 +127690,7 @@ vector<shared_ptr<ExternalDependency>> Relation::GetAllDependencies() {
|
|
|
127680
127690
|
|
|
127681
127691
|
|
|
127682
127692
|
|
|
127693
|
+
|
|
127683
127694
|
namespace duckdb {
|
|
127684
127695
|
|
|
127685
127696
|
//===--------------------------------------------------------------------===//
|
|
@@ -127760,6 +127771,17 @@ Value DebugForceExternal::GetSetting(ClientContext &context) {
|
|
|
127760
127771
|
return Value::BOOLEAN(ClientConfig::GetConfig(context).force_external);
|
|
127761
127772
|
}
|
|
127762
127773
|
|
|
127774
|
+
//===--------------------------------------------------------------------===//
|
|
127775
|
+
// Debug Force NoCrossProduct
|
|
127776
|
+
//===--------------------------------------------------------------------===//
|
|
127777
|
+
void DebugForceNoCrossProduct::SetLocal(ClientContext &context, const Value &input) {
|
|
127778
|
+
ClientConfig::GetConfig(context).force_no_cross_product = input.GetValue<bool>();
|
|
127779
|
+
}
|
|
127780
|
+
|
|
127781
|
+
Value DebugForceNoCrossProduct::GetSetting(ClientContext &context) {
|
|
127782
|
+
return Value::BOOLEAN(ClientConfig::GetConfig(context).force_no_cross_product);
|
|
127783
|
+
}
|
|
127784
|
+
|
|
127763
127785
|
//===--------------------------------------------------------------------===//
|
|
127764
127786
|
// Debug Many Free List blocks
|
|
127765
127787
|
//===--------------------------------------------------------------------===//
|
|
@@ -131867,6 +131889,7 @@ private:
|
|
|
131867
131889
|
|
|
131868
131890
|
|
|
131869
131891
|
|
|
131892
|
+
|
|
131870
131893
|
|
|
131871
131894
|
|
|
131872
131895
|
#include <algorithm>
|
|
@@ -132110,6 +132133,9 @@ bool JoinOrderOptimizer::TryEmitPair(JoinRelationSet *left, JoinRelationSet *rig
|
|
|
132110
132133
|
}
|
|
132111
132134
|
|
|
132112
132135
|
bool JoinOrderOptimizer::EmitCSG(JoinRelationSet *node) {
|
|
132136
|
+
if (node->count == relations.size()) {
|
|
132137
|
+
return true;
|
|
132138
|
+
}
|
|
132113
132139
|
// create the exclusion set as everything inside the subgraph AND anything with members BELOW it
|
|
132114
132140
|
unordered_set<idx_t> exclusion_set;
|
|
132115
132141
|
for (idx_t i = 0; i < node->relations[0]; i++) {
|
|
@@ -132153,7 +132179,7 @@ bool JoinOrderOptimizer::EnumerateCmpRecursive(JoinRelationSet *left, JoinRelati
|
|
|
132153
132179
|
auto neighbor = set_manager.GetJoinRelation(neighbors[i]);
|
|
132154
132180
|
// emit the combinations of this node and its neighbors
|
|
132155
132181
|
auto combined_set = set_manager.Union(right, neighbor);
|
|
132156
|
-
if (plans.find(combined_set) != plans.end()) {
|
|
132182
|
+
if (combined_set->count > right->count && plans.find(combined_set) != plans.end()) {
|
|
132157
132183
|
auto connection = query_graph.GetConnection(left, combined_set);
|
|
132158
132184
|
if (connection) {
|
|
132159
132185
|
if (!TryEmitPair(left, combined_set, connection)) {
|
|
@@ -132164,9 +132190,9 @@ bool JoinOrderOptimizer::EnumerateCmpRecursive(JoinRelationSet *left, JoinRelati
|
|
|
132164
132190
|
union_sets[i] = combined_set;
|
|
132165
132191
|
}
|
|
132166
132192
|
// recursively enumerate the sets
|
|
132193
|
+
unordered_set<idx_t> new_exclusion_set = exclusion_set;
|
|
132167
132194
|
for (idx_t i = 0; i < neighbors.size(); i++) {
|
|
132168
132195
|
// updated the set of excluded entries with this neighbor
|
|
132169
|
-
unordered_set<idx_t> new_exclusion_set = exclusion_set;
|
|
132170
132196
|
new_exclusion_set.insert(neighbors[i]);
|
|
132171
132197
|
if (!EnumerateCmpRecursive(left, union_sets[i], new_exclusion_set)) {
|
|
132172
132198
|
return false;
|
|
@@ -132188,7 +132214,7 @@ bool JoinOrderOptimizer::EnumerateCSGRecursive(JoinRelationSet *node, unordered_
|
|
|
132188
132214
|
auto neighbor = set_manager.GetJoinRelation(neighbors[i]);
|
|
132189
132215
|
// emit the combinations of this node and its neighbors
|
|
132190
132216
|
auto new_set = set_manager.Union(node, neighbor);
|
|
132191
|
-
if (plans.find(new_set) != plans.end()) {
|
|
132217
|
+
if (new_set->count > node->count && plans.find(new_set) != plans.end()) {
|
|
132192
132218
|
if (!EmitCSG(new_set)) {
|
|
132193
132219
|
return false;
|
|
132194
132220
|
}
|
|
@@ -132196,9 +132222,9 @@ bool JoinOrderOptimizer::EnumerateCSGRecursive(JoinRelationSet *node, unordered_
|
|
|
132196
132222
|
union_sets[i] = new_set;
|
|
132197
132223
|
}
|
|
132198
132224
|
// recursively enumerate the sets
|
|
132225
|
+
unordered_set<idx_t> new_exclusion_set = exclusion_set;
|
|
132199
132226
|
for (idx_t i = 0; i < neighbors.size(); i++) {
|
|
132200
132227
|
// updated the set of excluded entries with this neighbor
|
|
132201
|
-
unordered_set<idx_t> new_exclusion_set = exclusion_set;
|
|
132202
132228
|
new_exclusion_set.insert(neighbors[i]);
|
|
132203
132229
|
if (!EnumerateCSGRecursive(union_sets[i], new_exclusion_set)) {
|
|
132204
132230
|
return false;
|
|
@@ -132632,6 +132658,9 @@ unique_ptr<LogicalOperator> JoinOrderOptimizer::Optimize(unique_ptr<LogicalOpera
|
|
|
132632
132658
|
// could not find the final plan
|
|
132633
132659
|
// this should only happen in case the sets are actually disjunct
|
|
132634
132660
|
// in this case we need to generate cross product to connect the disjoint sets
|
|
132661
|
+
if (context.config.force_no_cross_product) {
|
|
132662
|
+
throw InternalException("HyperGraph isn't connected");
|
|
132663
|
+
}
|
|
132635
132664
|
GenerateCrossProducts();
|
|
132636
132665
|
//! solve the join order again
|
|
132637
132666
|
SolveJoinOrder();
|
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 "
|
|
15
|
-
#define DUCKDB_VERSION "v0.3.5-
|
|
14
|
+
#define DUCKDB_SOURCE_ID "eecef371d"
|
|
15
|
+
#define DUCKDB_VERSION "v0.3.5-dev584"
|
|
16
16
|
//===----------------------------------------------------------------------===//
|
|
17
17
|
// DuckDB
|
|
18
18
|
//
|
|
@@ -17327,6 +17327,8 @@ struct ClientConfig {
|
|
|
17327
17327
|
bool force_index_join = false;
|
|
17328
17328
|
//! Force out-of-core computation for operators that support it, used for testing
|
|
17329
17329
|
bool force_external = false;
|
|
17330
|
+
//! Force disable cross product generation when hyper graph isn't connected, used for testing
|
|
17331
|
+
bool force_no_cross_product = false;
|
|
17330
17332
|
//! Maximum bits allowed for using a perfect hash table (i.e. the perfect HT can hold up to 2^perfect_ht_threshold
|
|
17331
17333
|
//! elements)
|
|
17332
17334
|
idx_t perfect_ht_threshold = 12;
|