/src/duckdb/src/storage/compression/chimp/chimp.cpp
Line | Count | Source (jump to first uncovered line) |
1 | | #include "duckdb/function/compression/compression.hpp" |
2 | | #include "duckdb/function/compression_function.hpp" |
3 | | #include "duckdb/storage/compression/chimp/chimp_analyze.hpp" |
4 | | #include "duckdb/storage/compression/chimp/chimp_compress.hpp" |
5 | | #include "duckdb/storage/compression/chimp/chimp_fetch.hpp" |
6 | | #include "duckdb/storage/compression/chimp/chimp_scan.hpp" |
7 | | |
8 | | namespace duckdb { |
9 | | |
10 | | template <class T> |
11 | 0 | CompressionFunction GetChimpFunction(PhysicalType data_type) { |
12 | 0 | return CompressionFunction(CompressionType::COMPRESSION_CHIMP, data_type, ChimpInitAnalyze<T>, ChimpAnalyze<T>, |
13 | 0 | ChimpFinalAnalyze<T>, ChimpInitCompression<T>, ChimpCompress<T>, |
14 | 0 | ChimpFinalizeCompress<T>, ChimpInitScan<T>, ChimpScan<T>, ChimpScanPartial<T>, |
15 | 0 | ChimpFetchRow<T>, ChimpSkip<T>); |
16 | 0 | } Unexecuted instantiation: duckdb::CompressionFunction duckdb::GetChimpFunction<float>(duckdb::PhysicalType) Unexecuted instantiation: duckdb::CompressionFunction duckdb::GetChimpFunction<double>(duckdb::PhysicalType) |
17 | | |
18 | 0 | CompressionFunction ChimpCompressionFun::GetFunction(PhysicalType type) { |
19 | 0 | switch (type) { |
20 | 0 | case PhysicalType::FLOAT: |
21 | 0 | return GetChimpFunction<float>(type); |
22 | 0 | case PhysicalType::DOUBLE: |
23 | 0 | return GetChimpFunction<double>(type); |
24 | 0 | default: |
25 | 0 | throw InternalException("Unsupported type for Chimp"); |
26 | 0 | } |
27 | 0 | } |
28 | | |
29 | 0 | bool ChimpCompressionFun::TypeIsSupported(const PhysicalType physical_type) { |
30 | 0 | switch (physical_type) { |
31 | 0 | case PhysicalType::FLOAT: |
32 | 0 | case PhysicalType::DOUBLE: |
33 | 0 | return true; |
34 | 0 | default: |
35 | 0 | return false; |
36 | 0 | } |
37 | 0 | } |
38 | | |
39 | | } // namespace duckdb |