duckdb 0.6.2-dev1049.0 → 0.6.2-dev1060.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/src/common/sort/merge_sorter.cpp +9 -3
- package/src/duckdb/src/common/types/hash.cpp +2 -2
- package/src/duckdb/src/execution/index/art/node.cpp +2 -0
- package/src/duckdb/src/function/aggregate/distributive/approx_count.cpp +2 -2
- package/src/duckdb/src/function/scalar/string/string_split.cpp +1 -1
- package/src/duckdb/src/function/table/version/pragma_version.cpp +2 -2
- package/src/duckdb/src/include/duckdb/common/types/hugeint.hpp +3 -3
- package/src/duckdb/src/include/duckdb/storage/compression/chimp/chimp_compress.hpp +1 -1
- package/src/duckdb/src/include/duckdb/storage/compression/patas/patas_analyze.hpp +1 -1
- package/src/duckdb/src/include/duckdb/storage/compression/patas/patas_compress.hpp +1 -1
- package/src/duckdb/src/optimizer/deliminator.cpp +1 -1
- package/src/duckdb/src/optimizer/filter_combiner.cpp +4 -2
- package/src/duckdb/src/storage/buffer_manager.cpp +1 -1
- package/src/duckdb/third_party/libpg_query/src_backend_parser_scan.cpp +1 -1
package/package.json
CHANGED
|
@@ -364,18 +364,24 @@ void MergeSorter::MergeRadix(const idx_t &count, const bool left_smaller[]) {
|
|
|
364
364
|
const bool l_done = l.block_idx == l_blocks.size();
|
|
365
365
|
const bool r_done = r.block_idx == r_blocks.size();
|
|
366
366
|
// Pin the radix sortable blocks
|
|
367
|
+
idx_t l_count;
|
|
367
368
|
if (!l_done) {
|
|
368
369
|
l_block = l_blocks[l.block_idx].get();
|
|
369
370
|
left->PinRadix(l.block_idx);
|
|
370
371
|
l_ptr = l.RadixPtr();
|
|
372
|
+
l_count = l_block->count;
|
|
373
|
+
} else {
|
|
374
|
+
l_count = 0;
|
|
371
375
|
}
|
|
376
|
+
idx_t r_count;
|
|
372
377
|
if (!r_done) {
|
|
373
378
|
r_block = r_blocks[r.block_idx].get();
|
|
374
379
|
r.PinRadix(r.block_idx);
|
|
375
380
|
r_ptr = r.RadixPtr();
|
|
381
|
+
r_count = r_block->count;
|
|
382
|
+
} else {
|
|
383
|
+
r_count = 0;
|
|
376
384
|
}
|
|
377
|
-
const idx_t &l_count = !l_done ? l_block->count : 0;
|
|
378
|
-
const idx_t &r_count = !r_done ? r_block->count : 0;
|
|
379
385
|
// Copy using computed merge
|
|
380
386
|
if (!l_done && !r_done) {
|
|
381
387
|
// Both sides have data - merge
|
|
@@ -420,7 +426,7 @@ void MergeSorter::MergeData(SortedData &result_data, SortedData &l_data, SortedD
|
|
|
420
426
|
auto result_data_handle = buffer_manager.Pin(result_data_block->block);
|
|
421
427
|
data_ptr_t result_data_ptr = result_data_handle.Ptr() + result_data_block->count * row_width;
|
|
422
428
|
// Result heap to write to (if needed)
|
|
423
|
-
RowDataBlock *result_heap_block;
|
|
429
|
+
RowDataBlock *result_heap_block = nullptr;
|
|
424
430
|
BufferHandle result_heap_handle;
|
|
425
431
|
data_ptr_t result_heap_ptr;
|
|
426
432
|
if (!layout.AllConstant() && state.external) {
|
|
@@ -40,7 +40,7 @@ template <>
|
|
|
40
40
|
hash_t Hash(float val) {
|
|
41
41
|
static_assert(sizeof(float) == sizeof(uint32_t), "");
|
|
42
42
|
FloatingPointEqualityTransform<float>::OP(val);
|
|
43
|
-
uint32_t uval =
|
|
43
|
+
uint32_t uval = Load<uint32_t>((const_data_ptr_t)&val);
|
|
44
44
|
return murmurhash64(uval);
|
|
45
45
|
}
|
|
46
46
|
|
|
@@ -48,7 +48,7 @@ template <>
|
|
|
48
48
|
hash_t Hash(double val) {
|
|
49
49
|
static_assert(sizeof(double) == sizeof(uint64_t), "");
|
|
50
50
|
FloatingPointEqualityTransform<double>::OP(val);
|
|
51
|
-
uint64_t uval =
|
|
51
|
+
uint64_t uval = Load<uint64_t>((const_data_ptr_t)&val);
|
|
52
52
|
return murmurhash64(uval);
|
|
53
53
|
}
|
|
54
54
|
|
|
@@ -298,6 +298,8 @@ Node *Node::Deserialize(ART &art, idx_t block_id, idx_t offset) {
|
|
|
298
298
|
deserialized_node = (Node *)Node256::New();
|
|
299
299
|
break;
|
|
300
300
|
}
|
|
301
|
+
default:
|
|
302
|
+
throw InternalException("Unrecognized node type");
|
|
301
303
|
}
|
|
302
304
|
deserialized_node->DeserializeInternal(reader);
|
|
303
305
|
return deserialized_node;
|
|
@@ -93,8 +93,8 @@ static void ApproxCountDistinctUpdateFunction(Vector inputs[], AggregateInputDat
|
|
|
93
93
|
state_vector.ToUnifiedFormat(count, sdata);
|
|
94
94
|
auto states = (ApproxDistinctCountState **)sdata.data;
|
|
95
95
|
|
|
96
|
-
uint64_t *indices;
|
|
97
|
-
uint8_t *counts;
|
|
96
|
+
uint64_t *indices = nullptr;
|
|
97
|
+
uint8_t *counts = nullptr;
|
|
98
98
|
for (idx_t i = 0; i < count; i++) {
|
|
99
99
|
auto agg_state = states[sdata.sel->get_index(i)];
|
|
100
100
|
if (!agg_state->log) {
|
|
@@ -74,7 +74,7 @@ struct StringSplitter {
|
|
|
74
74
|
auto delim_size = delim.GetSize();
|
|
75
75
|
idx_t list_idx = 0;
|
|
76
76
|
while (input_size > 0) {
|
|
77
|
-
idx_t match_size;
|
|
77
|
+
idx_t match_size = 0;
|
|
78
78
|
auto pos = OP::Find(input_data, input_size, delim_data, delim_size, match_size, data);
|
|
79
79
|
if (pos > input_size) {
|
|
80
80
|
break;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#ifndef DUCKDB_VERSION
|
|
2
|
-
#define DUCKDB_VERSION "0.6.2-
|
|
2
|
+
#define DUCKDB_VERSION "0.6.2-dev1060"
|
|
3
3
|
#endif
|
|
4
4
|
#ifndef DUCKDB_SOURCE_ID
|
|
5
|
-
#define DUCKDB_SOURCE_ID "
|
|
5
|
+
#define DUCKDB_SOURCE_ID "b3f6a8f16d"
|
|
6
6
|
#endif
|
|
7
7
|
#include "duckdb/function/table/system_functions.hpp"
|
|
8
8
|
#include "duckdb/main/database.hpp"
|
|
@@ -149,7 +149,7 @@ public:
|
|
|
149
149
|
current_segment->count++;
|
|
150
150
|
|
|
151
151
|
if (is_valid) {
|
|
152
|
-
T floating_point_value =
|
|
152
|
+
T floating_point_value = Load<T>((const_data_ptr_t)&value);
|
|
153
153
|
NumericStatistics::Update<T>(current_segment->stats, floating_point_value);
|
|
154
154
|
} else {
|
|
155
155
|
//! FIXME: find a cheaper alternative to storing a NULL
|
|
@@ -102,7 +102,7 @@ struct EmptyPatasWriter {
|
|
|
102
102
|
using EXACT_TYPE = typename FloatingToExact<VALUE_TYPE>::type;
|
|
103
103
|
|
|
104
104
|
auto state_wrapper = (PatasAnalyzeState<VALUE_TYPE> *)state_p;
|
|
105
|
-
state_wrapper->WriteValue(
|
|
105
|
+
state_wrapper->WriteValue(Load<EXACT_TYPE>((const_data_ptr_t)&uncompressed_value), is_valid);
|
|
106
106
|
}
|
|
107
107
|
};
|
|
108
108
|
|
|
@@ -325,7 +325,7 @@ bool Deliminator::RemoveInequalityCandidate(unique_ptr<LogicalOperator> *plan, u
|
|
|
325
325
|
GetDelimJoins(**plan, delim_joins);
|
|
326
326
|
|
|
327
327
|
LogicalOperator *parent = nullptr;
|
|
328
|
-
idx_t parent_delim_get_side;
|
|
328
|
+
idx_t parent_delim_get_side = 0;
|
|
329
329
|
for (auto dj : delim_joins) {
|
|
330
330
|
D_ASSERT(dj->type == LogicalOperatorType::LOGICAL_DELIM_JOIN);
|
|
331
331
|
if (!HasChild(dj, &proj_or_agg, parent_delim_get_side)) {
|
|
@@ -119,8 +119,10 @@ void FilterCombiner::GenerateFilters(const std::function<void(unique_ptr<Express
|
|
|
119
119
|
callback(std::move(comparison));
|
|
120
120
|
}
|
|
121
121
|
// for each entry also create a comparison with each constant
|
|
122
|
-
int lower_index = -1
|
|
123
|
-
|
|
122
|
+
int lower_index = -1;
|
|
123
|
+
int upper_index = -1;
|
|
124
|
+
bool lower_inclusive = false;
|
|
125
|
+
bool upper_inclusive = false;
|
|
124
126
|
for (idx_t k = 0; k < constant_list.size(); k++) {
|
|
125
127
|
auto &info = constant_list[k];
|
|
126
128
|
if (info.comparison_type == ExpressionType::COMPARE_GREATERTHAN ||
|
|
@@ -720,9 +720,9 @@ private:
|
|
|
720
720
|
if (index_manager.RemoveIndex(index)) {
|
|
721
721
|
// the max_index that is currently in use has decreased
|
|
722
722
|
// as a result we can truncate the file
|
|
723
|
+
#ifndef WIN32 // this ended up causing issues when sorting
|
|
723
724
|
auto max_index = index_manager.GetMaxIndex();
|
|
724
725
|
auto &fs = FileSystem::GetFileSystem(db);
|
|
725
|
-
#ifndef WIN32 // this ended up causing issues when sorting
|
|
726
726
|
fs.Truncate(*handle, GetPositionInFile(max_index + 1));
|
|
727
727
|
#endif
|
|
728
728
|
}
|