Skip to content

Commit

Permalink
BitPacking vector compression with compact_vector library (hyrise#2350)
Browse files Browse the repository at this point in the history
- Implements BitPacking as new vector compression. BitPacking is a Null suppression technique, all values in a sequence are encoded with a fixed bit width that is determined by the maximum value.
- Removes SIMDBP-128 vector compression and replaces its usages in LZ4 encoding with BitPacking.
- Renames FixedSizeByteAligned to FixedWidthInteger to reflect that we do not support 3-Byte-aligned compression.
  • Loading branch information
benrobby authored Jun 2, 2021
1 parent 6b3fcde commit 73b242d
Show file tree
Hide file tree
Showing 76 changed files with 609 additions and 1,552 deletions.
15 changes: 9 additions & 6 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
[submodule "third_party/cpp-btree"]
path = third_party/cpp-btree
url = https://github.com/mrks/cpp-btree
[submodule "third_party/compact_vector"]
path = third_party/compact_vector
url = https://github.com/gmarcais/compact_vector.git
[submodule "third_party/cpplint"]
path = third_party/cpplint
url = https://github.com/cpplint/cpplint.git
Expand All @@ -19,6 +22,9 @@
[submodule "third_party/googletest"]
path = third_party/googletest
url = https://github.com/abseil/googletest.git
[submodule "third_party/jcch-dbgen"]
path = third_party/jcch-dbgen
url = https://github.com/mrks/dbgen.JCC-H.git
[submodule "third_party/jemalloc"]
path = third_party/jemalloc
url = https://github.com/jemalloc/jemalloc.git
Expand All @@ -38,6 +44,9 @@
path = third_party/nlohmann_json
url = https://github.com/nlohmann/json.git
shallow = true
[submodule "third_party/robin-map"]
path = third_party/robin-map
url = https://github.com/Tessil/robin-map.git
[submodule "third_party/sql-parser"]
path = third_party/sql-parser
url = https://github.com/hyrise/sql-parser
Expand All @@ -47,9 +56,3 @@
[submodule "third_party/zstd"]
path = third_party/zstd
url = https://github.com/facebook/zstd.git
[submodule "third_party/robin-map"]
path = third_party/robin-map
url = https://github.com/Tessil/robin-map.git
[submodule "third_party/jcch-dbgen"]
path = third_party/jcch-dbgen
url = https://github.com/mrks/dbgen.JCC-H.git
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ Contact: [email protected]
- Pascal Führlich
- Carl Gödecken
- Adrian Holfter
- Ben Hurdelhey
- Sven Ihde
- Ivan Illic
- Jonathan Janetzki
Expand Down
Binary file modified resources/test_data/bin/AllTypesMixColumn/LZ4.bin
Binary file not shown.
Binary file modified resources/test_data/bin/AllTypesNullValues/LZ4.bin
Binary file not shown.
Binary file modified resources/test_data/bin/AllTypesSegmentSorted/LZ4.bin
Binary file not shown.
Binary file modified resources/test_data/bin/AllTypesSegmentUnsorted/LZ4.bin
Binary file not shown.
Binary file modified resources/test_data/bin/LZ4MultipleBlocks.bin
Binary file not shown.
Binary file modified resources/test_data/bin/StringSegment/LZ4.bin
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ int_int|0|1|b|int|2|null|null|200|2|6|0|0|0
int_int|1|0|a|int|1|null|null|200|1|3|0|0|0
int_int|1|1|b|int|1|null|null|200|1|3|0|0|0
int_int_int_null|0|0|a|int|2|RunLength|null|144|0|12|0|0|0
int_int_int_null|0|1|b|int|1|Dictionary|SimdBp128|132|0|4|0|0|4
int_int_int_null|0|1|b|int|1|Dictionary|BitPacking|108|0|4|0|0|4
int_int_int_null|0|2|c|int|2|null|null|608|4|12|0|0|0
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ int_int|1|1|b|int|1|null|null|200|1|3|0|0|0
int_int|2|0|a|int|1|null|null|200|0|1|0|0|0
int_int|2|1|b|int|1|null|null|200|0|1|0|0|0
int_int_int_null|0|0|a|int|2|RunLength|null|144|0|12|0|0|0
int_int_int_null|0|1|b|int|1|Dictionary|SimdBp128|132|0|4|0|0|4
int_int_int_null|0|1|b|int|1|Dictionary|BitPacking|108|0|4|0|0|4
int_int_int_null|0|2|c|int|2|null|null|608|4|12|0|0|0
int_int_int_null|1|0|a|int|0|null|null|608|0|1|0|0|0
int_int_int_null|1|1|b|int|1|null|null|608|0|1|0|0|0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ int_int|0|1|b|int|2|null|null|192|2|6|0|0|0
int_int|1|0|a|int|1|null|null|192|1|3|0|0|0
int_int|1|1|b|int|1|null|null|192|1|3|0|0|0
int_int_int_null|0|0|a|int|2|RunLength|null|144|0|12|0|0|0
int_int_int_null|0|1|b|int|1|Dictionary|SimdBp128|132|0|4|0|0|4
int_int_int_null|0|1|b|int|1|Dictionary|BitPacking|108|0|4|0|0|4
int_int_int_null|0|2|c|int|2|null|null|600|4|12|0|0|0
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ int_int|1|1|b|int|1|null|null|192|1|3|0|0|0
int_int|2|0|a|int|1|null|null|192|0|1|0|0|0
int_int|2|1|b|int|1|null|null|192|0|1|0|0|0
int_int_int_null|0|0|a|int|2|RunLength|null|144|0|12|0|0|0
int_int_int_null|0|1|b|int|1|Dictionary|SimdBp128|132|0|4|0|0|4
int_int_int_null|0|1|b|int|1|Dictionary|BitPacking|108|0|4|0|0|4
int_int_int_null|0|2|c|int|2|null|null|600|4|12|0|0|0
int_int_int_null|1|0|a|int|0|null|null|600|0|1|0|0|0
int_int_int_null|1|1|b|int|1|null|null|600|0|1|0|0|0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ int_int|0|1|b|int|null|null|200|2|4|0|0|0
int_int|1|0|a|int|null|null|200|1|2|0|0|0
int_int|1|1|b|int|null|null|200|1|2|0|0|0
int_int_int_null|0|0|a|int|RunLength|null|144|0|8|0|0|0
int_int_int_null|0|1|b|int|Dictionary|SimdBp128|132|0|4|0|0|4
int_int_int_null|0|1|b|int|Dictionary|BitPacking|108|0|4|0|0|4
int_int_int_null|0|2|c|int|null|null|608|4|8|0|0|0
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ int_int|1|1|b|int|null|null|200|1|2|0|0|0
int_int|2|0|a|int|null|null|200|0|0|0|0|0
int_int|2|1|b|int|null|null|200|0|0|0|0|0
int_int_int_null|0|0|a|int|RunLength|null|144|0|8|0|0|0
int_int_int_null|0|1|b|int|Dictionary|SimdBp128|132|0|4|0|0|4
int_int_int_null|0|1|b|int|Dictionary|BitPacking|108|0|4|0|0|4
int_int_int_null|0|2|c|int|null|null|608|4|8|0|0|0
int_int_int_null|1|0|a|int|null|null|608|0|0|0|0|0
int_int_int_null|1|1|b|int|null|null|608|0|0|0|0|0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ int_int|0|1|b|int|null|null|192|2|4|0|0|0
int_int|1|0|a|int|null|null|192|1|2|0|0|0
int_int|1|1|b|int|null|null|192|1|2|0|0|0
int_int_int_null|0|0|a|int|RunLength|null|144|0|8|0|0|0
int_int_int_null|0|1|b|int|Dictionary|SimdBp128|132|0|4|0|0|4
int_int_int_null|0|1|b|int|Dictionary|BitPacking|108|0|4|0|0|4
int_int_int_null|0|2|c|int|null|null|600|4|8|0|0|0
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ int_int|1|1|b|int|null|null|192|1|2|0|0|0
int_int|2|0|a|int|null|null|192|0|0|0|0|0
int_int|2|1|b|int|null|null|192|0|0|0|0|0
int_int_int_null|0|0|a|int|RunLength|null|144|0|8|0|0|0
int_int_int_null|0|1|b|int|Dictionary|SimdBp128|132|0|4|0|0|4
int_int_int_null|0|1|b|int|Dictionary|BitPacking|108|0|4|0|0|4
int_int_int_null|0|2|c|int|null|null|600|4|8|0|0|0
int_int_int_null|1|0|a|int|null|null|600|0|0|0|0|0
int_int_int_null|1|1|b|int|null|null|600|0|0|0|0|0
Expand Down
2 changes: 1 addition & 1 deletion scripts/test/hyriseBenchmarkFileBased_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def main():
arguments["--runs"] = "100"
arguments["--warmup"] = "5"
arguments["--encoding"] = "'LZ4'"
arguments["--compression"] = "'SIMD-BP128'"
arguments["--compression"] = "'Bit-packing'"
arguments["--scheduler"] = "true"
arguments["--clients"] = "4"
arguments["--verify"] = "true"
Expand Down
2 changes: 1 addition & 1 deletion scripts/test/hyriseBenchmarkJCCH_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def main():
arguments["--runs"] = "100"
arguments["--warmup"] = "10"
arguments["--encoding"] = "'LZ4'"
arguments["--compression"] = "'SIMD-BP128'"
arguments["--compression"] = "'Bit-packing'"
arguments["--indexes"] = "false"
arguments["--scheduler"] = "true"
arguments["--clients"] = "4"
Expand Down
2 changes: 1 addition & 1 deletion scripts/test/hyriseBenchmarkJoinOrder_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def main():
arguments["--runs"] = "2"
arguments["--warmup"] = "2"
arguments["--encoding"] = "'LZ4'"
arguments["--compression"] = "'SIMD-BP128'"
arguments["--compression"] = "'Bit-packing'"
arguments["--scheduler"] = "true"
arguments["--clients"] = "4"
arguments["--chunk_size"] = "100000"
Expand Down
4 changes: 2 additions & 2 deletions scripts/test/hyriseBenchmarkTPCH_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def main():
arguments["--mode"] = "'Shuffled'"
arguments["--clustering"] = "Pruning"
arguments["--encoding"] = "'Dictionary'"
arguments["--compression"] = "'Fixed-size byte-aligned'"
arguments["--compression"] = "'Fixed-width integer'"
arguments["--indexes"] = "true"
arguments["--scheduler"] = "false"
arguments["--clients"] = "1"
Expand Down Expand Up @@ -123,7 +123,7 @@ def main():
arguments["--runs"] = "100"
arguments["--warmup"] = "10"
arguments["--encoding"] = "'LZ4'"
arguments["--compression"] = "'SIMD-BP128'"
arguments["--compression"] = "'Bit-packing'"
arguments["--indexes"] = "false"
arguments["--scheduler"] = "true"
arguments["--clients"] = "4"
Expand Down
29 changes: 13 additions & 16 deletions src/lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -532,23 +532,19 @@ set(
storage/vector_compression/base_vector_compressor.hpp
storage/vector_compression/base_vector_decompressor.hpp
storage/vector_compression/compressed_vector_type.hpp
storage/vector_compression/fixed_size_byte_aligned/fixed_size_byte_aligned_compressor.cpp
storage/vector_compression/fixed_size_byte_aligned/fixed_size_byte_aligned_compressor.hpp
storage/vector_compression/fixed_size_byte_aligned/fixed_size_byte_aligned_decompressor.hpp
storage/vector_compression/fixed_size_byte_aligned/fixed_size_byte_aligned_utils.hpp
storage/vector_compression/fixed_size_byte_aligned/fixed_size_byte_aligned_vector.hpp
storage/vector_compression/fixed_width_integer/fixed_width_integer_compressor.cpp
storage/vector_compression/fixed_width_integer/fixed_width_integer_compressor.hpp
storage/vector_compression/fixed_width_integer/fixed_width_integer_decompressor.hpp
storage/vector_compression/fixed_width_integer/fixed_width_integer_utils.hpp
storage/vector_compression/fixed_width_integer/fixed_width_integer_vector.hpp
storage/vector_compression/resolve_compressed_vector_type.hpp
storage/vector_compression/simd_bp128/oversized_types.hpp
storage/vector_compression/simd_bp128/simd_bp128_compressor.cpp
storage/vector_compression/simd_bp128/simd_bp128_compressor.hpp
storage/vector_compression/simd_bp128/simd_bp128_decompressor.cpp
storage/vector_compression/simd_bp128/simd_bp128_decompressor.hpp
storage/vector_compression/simd_bp128/simd_bp128_iterator.cpp
storage/vector_compression/simd_bp128/simd_bp128_iterator.hpp
storage/vector_compression/simd_bp128/simd_bp128_packing.cpp
storage/vector_compression/simd_bp128/simd_bp128_packing.hpp
storage/vector_compression/simd_bp128/simd_bp128_vector.cpp
storage/vector_compression/simd_bp128/simd_bp128_vector.hpp
storage/vector_compression/bitpacking/bitpacking_compressor.cpp
storage/vector_compression/bitpacking/bitpacking_compressor.hpp
storage/vector_compression/bitpacking/bitpacking_iterator.hpp
storage/vector_compression/bitpacking/bitpacking_decompressor.hpp
storage/vector_compression/bitpacking/bitpacking_vector.hpp
storage/vector_compression/bitpacking/bitpacking_vector.cpp
storage/vector_compression/bitpacking/bitpacking_vector_type.hpp
storage/vector_compression/vector_compression.cpp
storage/vector_compression/vector_compression.hpp
strong_typedef.hpp
Expand Down Expand Up @@ -648,6 +644,7 @@ set(

set(
LIBRARIES
compact_vector
lz4
sqlparser
uninitialized_vector
Expand Down
20 changes: 10 additions & 10 deletions src/lib/constant_mappings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ const boost::bimap<LogLevel, std::string> log_level_to_string = make_bimap<LogLe

const boost::bimap<VectorCompressionType, std::string> vector_compression_type_to_string =
make_bimap<VectorCompressionType, std::string>({
{VectorCompressionType::FixedSizeByteAligned, "Fixed-size byte-aligned"},
{VectorCompressionType::SimdBp128, "SIMD-BP128"},
{VectorCompressionType::FixedWidthInteger, "Fixed-width integer"},
{VectorCompressionType::BitPacking, "Bit-packing"},
});

std::ostream& operator<<(std::ostream& stream, const AggregateFunction aggregate_function) {
Expand Down Expand Up @@ -84,20 +84,20 @@ std::ostream& operator<<(std::ostream& stream, const VectorCompressionType vecto

std::ostream& operator<<(std::ostream& stream, const CompressedVectorType compressed_vector_type) {
switch (compressed_vector_type) {
case CompressedVectorType::FixedSize4ByteAligned: {
stream << "FixedSize4ByteAligned";
case CompressedVectorType::FixedWidthInteger4Byte: {
stream << "FixedWidthInteger4Byte";
break;
}
case CompressedVectorType::FixedSize2ByteAligned: {
stream << "FixedSize2ByteAligned";
case CompressedVectorType::FixedWidthInteger2Byte: {
stream << "FixedWidthInteger2Byte";
break;
}
case CompressedVectorType::FixedSize1ByteAligned: {
stream << "FixedSize1ByteAligned";
case CompressedVectorType::FixedWidthInteger1Byte: {
stream << "FixedWidthInteger1Byte";
break;
}
case CompressedVectorType::SimdBp128: {
stream << "SimdBp128";
case CompressedVectorType::BitPacking: {
stream << "BitPacking";
break;
}
default:
Expand Down
76 changes: 43 additions & 33 deletions src/lib/import_export/binary/binary_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@
#include "resolve_type.hpp"
#include "storage/chunk.hpp"
#include "storage/encoding_type.hpp"
#include "storage/vector_compression/fixed_size_byte_aligned/fixed_size_byte_aligned_vector.hpp"
#include "storage/vector_compression/simd_bp128/oversized_types.hpp"
#include "storage/vector_compression/simd_bp128/simd_bp128_vector.hpp"
#include "storage/vector_compression/bitpacking/bitpacking_vector.hpp"
#include "storage/vector_compression/fixed_width_integer/fixed_width_integer_vector.hpp"

#include "utils/assert.hpp"

Expand All @@ -34,6 +33,14 @@ std::shared_ptr<Table> BinaryParser::parse(const std::string& filename) {
return table;
}

template <typename T>
pmr_compact_vector BinaryParser::_read_values_compact_vector(std::ifstream& file, const size_t count) {
const auto bit_width = _read_value<uint8_t>(file);
auto values = pmr_compact_vector(bit_width, count);
file.read(reinterpret_cast<char*>(values.get()), values.bytes());
return values;
}

template <typename T>
pmr_vector<T> BinaryParser::_read_values(std::ifstream& file, const size_t count) {
pmr_vector<T> values(count);
Expand Down Expand Up @@ -185,21 +192,21 @@ std::shared_ptr<ValueSegment<T>> BinaryParser::_import_value_segment(std::ifstre
template <typename T>
std::shared_ptr<DictionarySegment<T>> BinaryParser::_import_dictionary_segment(std::ifstream& file,
ChunkOffset row_count) {
const auto attribute_vector_width = _read_value<AttributeVectorWidth>(file);
const auto compressed_vector_type_id = _read_value<CompressedVectorTypeID>(file);
const auto dictionary_size = _read_value<ValueID>(file);
auto dictionary = std::make_shared<pmr_vector<T>>(_read_values<T>(file, dictionary_size));

auto attribute_vector = _import_attribute_vector(file, row_count, attribute_vector_width);
auto attribute_vector = _import_attribute_vector(file, row_count, compressed_vector_type_id);

return std::make_shared<DictionarySegment<T>>(dictionary, attribute_vector);
}

std::shared_ptr<FixedStringDictionarySegment<pmr_string>> BinaryParser::_import_fixed_string_dictionary_segment(
std::ifstream& file, ChunkOffset row_count) {
const auto attribute_vector_width = _read_value<AttributeVectorWidth>(file);
const auto compressed_vector_type_id = _read_value<CompressedVectorTypeID>(file);
const auto dictionary_size = _read_value<ValueID>(file);
auto dictionary = _import_fixed_string_vector(file, dictionary_size);
auto attribute_vector = _import_attribute_vector(file, row_count, attribute_vector_width);
auto attribute_vector = _import_attribute_vector(file, row_count, compressed_vector_type_id);

return std::make_shared<FixedStringDictionarySegment<pmr_string>>(dictionary, attribute_vector);
}
Expand All @@ -218,7 +225,7 @@ std::shared_ptr<RunLengthSegment<T>> BinaryParser::_import_run_length_segment(st
template <typename T>
std::shared_ptr<FrameOfReferenceSegment<T>> BinaryParser::_import_frame_of_reference_segment(std::ifstream& file,
ChunkOffset row_count) {
const auto attribute_vector_width = _read_value<AttributeVectorWidth>(file);
const auto compressed_vector_type_id = _read_value<CompressedVectorTypeID>(file);
const auto block_count = _read_value<uint32_t>(file);
const auto block_minima = pmr_vector<T>(_read_values<T>(file, block_count));

Expand All @@ -228,7 +235,7 @@ std::shared_ptr<FrameOfReferenceSegment<T>> BinaryParser::_import_frame_of_refer
null_values = pmr_vector<bool>(_read_values<bool>(file, row_count));
}

auto offset_values = _import_offset_value_vector(file, row_count, attribute_vector_width);
auto offset_values = _import_offset_value_vector(file, row_count, compressed_vector_type_id);

return std::make_shared<FrameOfReferenceSegment<T>>(block_minima, null_values, std::move(offset_values));
}
Expand Down Expand Up @@ -263,12 +270,7 @@ std::shared_ptr<LZ4Segment<T>> BinaryParser::_import_lz4_segment(std::ifstream&
const auto string_offsets_size = _read_value<uint32_t>(file);

if (string_offsets_size > 0) {
const auto string_offsets_data_size = _read_value<uint32_t>(file);

// so far, only SimdBp128 compression is supported
auto string_offsets =
std::make_unique<SimdBp128Vector>(_read_values<uint128_t>(file, string_offsets_data_size), string_offsets_size);

auto string_offsets = std::make_unique<BitPackingVector>(_read_values_compact_vector<uint32_t>(file, row_count));
return std::make_shared<LZ4Segment<T>>(std::move(lz4_blocks), std::move(null_values), std::move(dictionary),
std::move(string_offsets), block_size, last_block_size, compressed_size,
num_elements);
Expand All @@ -284,30 +286,38 @@ std::shared_ptr<LZ4Segment<T>> BinaryParser::_import_lz4_segment(std::ifstream&
}

std::shared_ptr<BaseCompressedVector> BinaryParser::_import_attribute_vector(
std::ifstream& file, ChunkOffset row_count, AttributeVectorWidth attribute_vector_width) {
switch (attribute_vector_width) {
case 1:
return std::make_shared<FixedSizeByteAlignedVector<uint8_t>>(_read_values<uint8_t>(file, row_count));
case 2:
return std::make_shared<FixedSizeByteAlignedVector<uint16_t>>(_read_values<uint16_t>(file, row_count));
case 4:
return std::make_shared<FixedSizeByteAlignedVector<uint32_t>>(_read_values<uint32_t>(file, row_count));
std::ifstream& file, const ChunkOffset row_count, const CompressedVectorTypeID compressed_vector_type_id) {
const auto compressed_vector_type = static_cast<CompressedVectorType>(compressed_vector_type_id);
switch (compressed_vector_type) {
case CompressedVectorType::BitPacking:
return std::make_shared<BitPackingVector>(_read_values_compact_vector<uint32_t>(file, row_count));
case CompressedVectorType::FixedWidthInteger1Byte:
return std::make_shared<FixedWidthIntegerVector<uint8_t>>(_read_values<uint8_t>(file, row_count));
case CompressedVectorType::FixedWidthInteger2Byte:
return std::make_shared<FixedWidthIntegerVector<uint16_t>>(_read_values<uint16_t>(file, row_count));
case CompressedVectorType::FixedWidthInteger4Byte:
return std::make_shared<FixedWidthIntegerVector<uint32_t>>(_read_values<uint32_t>(file, row_count));
default:
Fail("Cannot import attribute vector with width: " + std::to_string(attribute_vector_width));
Fail("Cannot import attribute vector with compressed vector type id: " +
std::to_string(compressed_vector_type_id));
}
}

std::unique_ptr<const BaseCompressedVector> BinaryParser::_import_offset_value_vector(
std::ifstream& file, ChunkOffset row_count, AttributeVectorWidth attribute_vector_width) {
switch (attribute_vector_width) {
case 1:
return std::make_unique<FixedSizeByteAlignedVector<uint8_t>>(_read_values<uint8_t>(file, row_count));
case 2:
return std::make_unique<FixedSizeByteAlignedVector<uint16_t>>(_read_values<uint16_t>(file, row_count));
case 4:
return std::make_unique<FixedSizeByteAlignedVector<uint32_t>>(_read_values<uint32_t>(file, row_count));
std::ifstream& file, const ChunkOffset row_count, const CompressedVectorTypeID compressed_vector_type_id) {
const auto compressed_vector_type = static_cast<CompressedVectorType>(compressed_vector_type_id);
switch (compressed_vector_type) {
case CompressedVectorType::BitPacking:
return std::make_unique<BitPackingVector>(_read_values_compact_vector<uint32_t>(file, row_count));
case CompressedVectorType::FixedWidthInteger1Byte:
return std::make_unique<FixedWidthIntegerVector<uint8_t>>(_read_values<uint8_t>(file, row_count));
case CompressedVectorType::FixedWidthInteger2Byte:
return std::make_unique<FixedWidthIntegerVector<uint16_t>>(_read_values<uint16_t>(file, row_count));
case CompressedVectorType::FixedWidthInteger4Byte:
return std::make_unique<FixedWidthIntegerVector<uint32_t>>(_read_values<uint32_t>(file, row_count));
default:
Fail("Cannot import attribute vector with width: " + std::to_string(attribute_vector_width));
Fail("Cannot import attribute vector with compressed vector type id: " +
std::to_string(compressed_vector_type_id));
}
}

Expand Down
Loading

0 comments on commit 73b242d

Please sign in to comment.