Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 "1"
#define DUCKDB_PATCH_VERSION "2-dev6"
#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.1"
#define DUCKDB_VERSION "v1.1.2-dev6"
#endif
#ifndef DUCKDB_SOURCE_ID
#define DUCKDB_SOURCE_ID "af39bd0dcf"
#define DUCKDB_SOURCE_ID "acd16816e3"
#endif
#include "duckdb/function/table/system_functions.hpp"
#include "duckdb/main/database.hpp"
Expand Down
7 changes: 3 additions & 4 deletions src/duckdb/src/include/duckdb/common/bitpacking.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,15 @@ class BitpackingPrimitives {
}
} else {
idx_t misaligned_count = count % BITPACKING_ALGORITHM_GROUP_SIZE;
T tmp_buffer[BITPACKING_ALGORITHM_GROUP_SIZE]; // TODO maybe faster on the heap?

count -= misaligned_count;

for (idx_t i = 0; i < count; i += BITPACKING_ALGORITHM_GROUP_SIZE) {
PackGroup<T>(dst + (i * width) / 8, src + i, width);
}

// Input was not aligned to BITPACKING_ALGORITHM_GROUP_SIZE, we need a copy
// The input is not aligned to BITPACKING_ALGORITHM_GROUP_SIZE.
// Copy the unaligned count into a zero-initialized temporary group, and pack it.
if (misaligned_count) {
T tmp_buffer[BITPACKING_ALGORITHM_GROUP_SIZE] = {0};
memcpy(tmp_buffer, src + count, misaligned_count * sizeof(T));
PackGroup<T>(dst + (count * width) / 8, tmp_buffer, width);
}
Expand Down
10 changes: 7 additions & 3 deletions src/duckdb/src/storage/compression/bitpacking.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,10 +264,14 @@ struct BitpackingState {
delta_required_bitwidth, static_cast<T>(minimum_delta), delta_offset,
compression_buffer, compression_buffer_idx, data_ptr);

// FOR (frame of reference).
total_size += sizeof(T);
// Aligned bitpacking width.
total_size += AlignValue(sizeof(bitpacking_width_t));
// Delta offset.
total_size += sizeof(T);
// Compressed data size.
total_size += BitpackingPrimitives::GetRequiredSize(compression_buffer_idx, delta_required_bitwidth);
total_size += sizeof(T); // FOR value
total_size += sizeof(T); // Delta offset value
total_size += AlignValue(sizeof(bitpacking_width_t)); // FOR value

return true;
}
Expand Down