Skip to content

Commit

Permalink
CI fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
royi-luo committed Jun 25, 2024
1 parent 4245526 commit c45cc9a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions src/storage/compression/compression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -462,13 +462,13 @@ void IntegerBitpacking<T>::setValuesFromUncompressed(const uint8_t* srcBuffer, o
// non-zero offset However we don't care about the value stored for null values
// Currently they will be mangled by storage+recovery (underflow in the subtraction
// below)
KU_ASSERT(
numValues == std::ranges::count_if(std::ranges::iota_view{posInSrc, posInSrc + numValues},
[srcBuffer, &metadata, nullMask](offset_t i) {
auto value = reinterpret_cast<const T*>(srcBuffer)[i];
return (nullMask && nullMask->isNull(i)) ||
canUpdateInPlace(std::span(&value, 1), metadata);
}));
KU_ASSERT(numValues == static_cast<offset_t>(std::ranges::count_if(
std::ranges::iota_view{posInSrc, posInSrc + numValues},
[srcBuffer, &metadata, nullMask](offset_t i) {
auto value = reinterpret_cast<const T*>(srcBuffer)[i];
return (nullMask && nullMask->isNull(i)) ||
canUpdateInPlace(std::span(&value, 1), metadata);
})));

// Data can be considered to be stored in aligned chunks of 32 values
// with a size of 32 * bitWidth bits,
Expand Down
2 changes: 1 addition & 1 deletion test/storage/compression_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ TEST(CompressionTests, IntegerPackingTest64SetValuesFromUncompressed) {
TEST(CompressionTests, IntegerPackingTest128WorksOnNonZeroBuffer) {
std::vector<int128_t> src(128);
for (size_t i = 0; i < src.size(); ++i) {
src[i] = (int128_t(1) << 125) + int128_t(i);
src[i] = (int128_t(1) << 125) + int128_t{i};
}
auto alg = IntegerBitpacking<int128_t>();
std::vector<uint8_t> dest(sizeof(int128_t) * src.size(), 0xff);
Expand Down

0 comments on commit c45cc9a

Please sign in to comment.