| 1 | //===----------------------------------------------------------------------===// |
|---|---|
| 2 | // DuckDB |
| 3 | // |
| 4 | // duckdb/storage/segment/uncompressed.hpp |
| 5 | // |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | #pragma once |
| 10 | |
| 11 | #include "duckdb/storage/table/column_segment.hpp" |
| 12 | |
| 13 | namespace duckdb { |
| 14 | class DatabaseInstance; |
| 15 | |
| 16 | struct UncompressedFunctions { |
| 17 | static unique_ptr<CompressionState> InitCompression(ColumnDataCheckpointer &checkpointer, |
| 18 | unique_ptr<AnalyzeState> state); |
| 19 | static void Compress(CompressionState &state_p, Vector &data, idx_t count); |
| 20 | static void FinalizeCompress(CompressionState &state_p); |
| 21 | static void EmptySkip(ColumnSegment &segment, ColumnScanState &state, idx_t skip_count) { |
| 22 | } |
| 23 | }; |
| 24 | |
| 25 | struct FixedSizeUncompressed { |
| 26 | static CompressionFunction GetFunction(PhysicalType data_type); |
| 27 | }; |
| 28 | |
| 29 | struct ValidityUncompressed { |
| 30 | public: |
| 31 | static CompressionFunction GetFunction(PhysicalType data_type); |
| 32 | |
| 33 | public: |
| 34 | static const validity_t LOWER_MASKS[65]; |
| 35 | static const validity_t UPPER_MASKS[65]; |
| 36 | }; |
| 37 | |
| 38 | struct StringUncompressed { |
| 39 | public: |
| 40 | static CompressionFunction GetFunction(PhysicalType data_type); |
| 41 | |
| 42 | public: |
| 43 | //! The max string size that is allowed within a block. Strings bigger than this will be labeled as a BIG STRING and |
| 44 | //! offloaded to the overflow blocks. |
| 45 | static constexpr uint16_t STRING_BLOCK_LIMIT = 4096; |
| 46 | }; |
| 47 | |
| 48 | } // namespace duckdb |
| 49 |