Skip to content

Commit

Permalink
vendor: Update vendored sources to duckdb/duckdb@dcb9627 (#980)
Browse files Browse the repository at this point in the history
[Dev] Fix an unnecessary copy in Dictionary compression (duckdb/duckdb#15594)

Co-authored-by: krlmlr <[email protected]>
  • Loading branch information
github-actions[bot] and krlmlr authored Jan 8, 2025
1 parent 0dc6638 commit 9f5e2bb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/duckdb/src/function/table/version/pragma_version.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef DUCKDB_PATCH_VERSION
#define DUCKDB_PATCH_VERSION "4-dev4159"
#define DUCKDB_PATCH_VERSION "4-dev4161"
#endif
#ifndef DUCKDB_MINOR_VERSION
#define DUCKDB_MINOR_VERSION 1
Expand All @@ -8,10 +8,10 @@
#define DUCKDB_MAJOR_VERSION 1
#endif
#ifndef DUCKDB_VERSION
#define DUCKDB_VERSION "v1.1.4-dev4159"
#define DUCKDB_VERSION "v1.1.4-dev4161"
#endif
#ifndef DUCKDB_SOURCE_ID
#define DUCKDB_SOURCE_ID "69dff93d1a"
#define DUCKDB_SOURCE_ID "dcb9627543"
#endif
#include "duckdb/function/table/system_functions.hpp"
#include "duckdb/main/database.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ struct DictionaryCompressionCompressState : public DictionaryCompressionState {
data_ptr_t current_end_ptr;

// Buffers and map for current segment
StringHeap heap;
string_map_t<uint32_t> current_string_map;
vector<uint32_t> index_buffer;
vector<uint32_t> selection_buffer;
Expand Down
7 changes: 4 additions & 3 deletions src/duckdb/src/storage/compression/dictionary/compression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ namespace duckdb {
DictionaryCompressionCompressState::DictionaryCompressionCompressState(ColumnDataCheckpointData &checkpoint_data_p,
const CompressionInfo &info)
: DictionaryCompressionState(info), checkpoint_data(checkpoint_data_p),
function(checkpoint_data.GetCompressionFunction(CompressionType::COMPRESSION_DICTIONARY)),
heap(BufferAllocator::Get(checkpoint_data.GetDatabase())) {
function(checkpoint_data.GetCompressionFunction(CompressionType::COMPRESSION_DICTIONARY)) {
CreateEmptySegment(checkpoint_data.GetRowGroup().start);
}

Expand Down Expand Up @@ -72,7 +71,9 @@ void DictionaryCompressionCompressState::AddNewString(string_t str) {
if (str.IsInlined()) {
current_string_map.insert({str, index_buffer.size() - 1});
} else {
current_string_map.insert({heap.AddBlob(str), index_buffer.size() - 1});
string_t dictionary_string((const char *)dict_pos, UnsafeNumericCast<uint32_t>(str.GetSize())); // NOLINT
D_ASSERT(!dictionary_string.IsInlined());
current_string_map.insert({dictionary_string, index_buffer.size() - 1});
}
DictionaryCompression::SetDictionary(*current_segment, current_handle, current_dictionary);

Expand Down

0 comments on commit 9f5e2bb

Please sign in to comment.