duckdb 0.6.2-dev484.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 +1 -1
- package/src/duckdb.cpp +14 -7
- package/src/duckdb.hpp +761 -754
- package/src/parquet-amalgamation.cpp +34953 -34953
package/package.json
CHANGED
package/src/duckdb.cpp
CHANGED
|
@@ -48577,9 +48577,6 @@ static_assert(sizeof(timestamp_t) == sizeof(int64_t), "timestamp_t was padded");
|
|
|
48577
48577
|
// T may be a space
|
|
48578
48578
|
// Z is optional
|
|
48579
48579
|
// ISO 8601
|
|
48580
|
-
static inline bool CharacterIsTimeZone(char c) {
|
|
48581
|
-
return StringUtil::CharacterIsAlpha(c) || StringUtil::CharacterIsDigit(c) || c == '_' || c == '/';
|
|
48582
|
-
}
|
|
48583
48580
|
|
|
48584
48581
|
bool Timestamp::TryConvertTimestampTZ(const char *str, idx_t len, timestamp_t &result, bool &has_offset, string_t &tz) {
|
|
48585
48582
|
idx_t pos;
|
|
@@ -110150,8 +110147,8 @@ bool StrpTimeFormat::Parse(string_t str, ParseResult &result) {
|
|
|
110150
110147
|
pos++;
|
|
110151
110148
|
}
|
|
110152
110149
|
const auto tz_begin = data + pos;
|
|
110153
|
-
// stop when we encounter a
|
|
110154
|
-
while (pos < size &&
|
|
110150
|
+
// stop when we encounter a non-tz character
|
|
110151
|
+
while (pos < size && Timestamp::CharacterIsTimeZone(data[pos])) {
|
|
110155
110152
|
pos++;
|
|
110156
110153
|
}
|
|
110157
110154
|
const auto tz_end = data + pos;
|
|
@@ -156979,6 +156976,7 @@ private:
|
|
|
156979
156976
|
void UpdateDPTree(JoinNode *new_plan);
|
|
156980
156977
|
|
|
156981
156978
|
void UpdateJoinNodesInFullPlan(JoinNode *node);
|
|
156979
|
+
bool NodeInFullPlan(JoinNode *node);
|
|
156982
156980
|
|
|
156983
156981
|
std::pair<JoinRelationSet *, unique_ptr<LogicalOperator>>
|
|
156984
156982
|
GenerateJoins(vector<unique_ptr<LogicalOperator>> &extracted_relations, JoinNode *node);
|
|
@@ -157709,7 +157707,6 @@ string JoinNode::ToString() {
|
|
|
157709
157707
|
|
|
157710
157708
|
|
|
157711
157709
|
|
|
157712
|
-
|
|
157713
157710
|
#include <algorithm>
|
|
157714
157711
|
|
|
157715
157712
|
namespace std {
|
|
@@ -157978,6 +157975,10 @@ unique_ptr<JoinNode> JoinOrderOptimizer::CreateJoinTree(JoinRelationSet *set,
|
|
|
157978
157975
|
return result;
|
|
157979
157976
|
}
|
|
157980
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
|
+
|
|
157981
157982
|
void JoinOrderOptimizer::UpdateJoinNodesInFullPlan(JoinNode *node) {
|
|
157982
157983
|
if (!node) {
|
|
157983
157984
|
return;
|
|
@@ -158208,7 +158209,7 @@ static vector<unordered_set<idx_t>> AddSuperSets(vector<unordered_set<idx_t>> cu
|
|
|
158208
158209
|
}
|
|
158209
158210
|
|
|
158210
158211
|
// works by first creating all sets with cardinality 1
|
|
158211
|
-
// then iterates over each previously
|
|
158212
|
+
// then iterates over each previously created group of subsets and will only add a neighbor if the neighbor
|
|
158212
158213
|
// is greater than all relations in the set.
|
|
158213
158214
|
static vector<unordered_set<idx_t>> GetAllNeighborSets(JoinRelationSet *new_set, unordered_set<idx_t> &exclusion_set,
|
|
158214
158215
|
vector<idx_t> neighbors) {
|
|
@@ -158244,6 +158245,11 @@ static vector<unordered_set<idx_t>> GetAllNeighborSets(JoinRelationSet *new_set,
|
|
|
158244
158245
|
}
|
|
158245
158246
|
|
|
158246
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
|
+
}
|
|
158247
158253
|
auto new_set = new_plan->set;
|
|
158248
158254
|
// now update every plan that uses this plan
|
|
158249
158255
|
unordered_set<idx_t> exclusion_set;
|
|
@@ -158305,6 +158311,7 @@ void JoinOrderOptimizer::SolveJoinOrderApproximately() {
|
|
|
158305
158311
|
// update the DP tree in case a plan created by the DP algorithm uses the node
|
|
158306
158312
|
// that was potentially just updated by EmitPair. You will get a use-after-free
|
|
158307
158313
|
// error if future plans rely on the old node that was just replaced.
|
|
158314
|
+
// if node in FullPath, then updateDP tree.
|
|
158308
158315
|
UpdateDPTree(node);
|
|
158309
158316
|
|
|
158310
158317
|
if (!best_connection || node->GetCost() < best_connection->GetCost()) {
|