|
| static bool | IsImpossibleToEncode (T n) |
| static int64_t | NumberToInt64 (T n) |
| static int64_t | EncodeValue (T value, AlpEncodingIndices encoding_indices) |
| static T | DecodeValue (int64_t encoded_value, AlpEncodingIndices encoding_indices) |
| static bool | CompareALPCombinations (const AlpCombination &c1, const AlpCombination &c2) |
| template<bool PENALIZE_EXCEPTIONS> |
| static uint64_t | DryCompressToEstimateSize (const vector< T > &input_vector, AlpEncodingIndices encoding_indices) |
| static void | FindTopKCombinations (const vector< vector< T > > &vectors_sampled, CompressionData &compression_data) |
| static void | FindBestFactorAndExponent (const T *input_vector, idx_t n_values, CompressionData &compression_data) |
| static void | Compress (const T *input_vector, idx_t n_values, const uint16_t *vector_null_positions, idx_t nulls_count, CompressionData &compression_data) |
| static void | Compress (const T *input_vector, idx_t n_values, CompressionData &compression_data) |
|
|
static constexpr uint8_t | EXACT_TYPE_BITSIZE = sizeof(T) * 8 |
◆ IsImpossibleToEncode()
template<class T, bool EMPTY>
Verification for -0.0
392724 {
392727 }
Definition duckdb.cpp:392716
◆ NumberToInt64()
template<class T, bool EMPTY>
392732 {
392735 }
392738 }
static bool IsImpossibleToEncode(T n)
Definition duckdb.cpp:392724
◆ EncodeValue()
template<class T, bool EMPTY>
◆ DecodeValue()
template<class T, bool EMPTY>
The cast to T is needed to prevent a signed integer overflow
◆ CompareALPCombinations()
template<class T, bool EMPTY>
392768 {
392769 return (
c1.n_appearances >
c2.n_appearances) ||
392770 (
c1.n_appearances ==
c2.n_appearances &&
392771 (
c1.estimated_compression_size <
c2.estimated_compression_size)) ||
392772 ((
c1.n_appearances ==
c2.n_appearances &&
392773 c1.estimated_compression_size ==
c2.estimated_compression_size) &&
392774 (
c2.encoding_indices.exponent <
c1.encoding_indices.exponent)) ||
392775 ((
c1.n_appearances ==
c2.n_appearances &&
392776 c1.estimated_compression_size ==
c2.estimated_compression_size &&
392777 c2.encoding_indices.exponent ==
c1.encoding_indices.exponent) &&
392778 (
c2.encoding_indices.factor <
c1.encoding_indices.factor));
392779 }
◆ DryCompressToEstimateSize()
template<class T, bool EMPTY>
template<bool PENALIZE_EXCEPTIONS>
392785 {
392793
392801 continue;
392802 }
392804 }
392805
392806
392809 }
392810
392811
392818 }
static T DecodeValue(int64_t encoded_value, AlpEncodingIndices encoding_indices)
Definition duckdb.cpp:392753
◆ FindTopKCombinations()
template<class T, bool EMPTY>
We start our optimization with the worst possible total bits obtained from compression
We try all combinations in search for the one which minimize the compression size
392825 {
392827
392830
392835
392839
392840
392851 }
392852 }
392853 }
392855 }
392856
392857
392858
392864 0
392865 );
392866 }
392868
392869
392872 }
392873 }
◆ FindBestFactorAndExponent()
template<class T, bool EMPTY>
We sample equidistant values within a vector; to do this we skip a fixed number of values
We try each K combination in search for the one which minimize the compression size in the vector
392879 {
392886 }
392887
392891
392896
392897
392900
392902 break;
392903 }
392904 continue;
392905 }
392906
392910 }
392912 }
◆ Compress() [1/2]
template<class T, bool EMPTY>
We encode all the values regardless of their correctness to recover the original floating-point
We detect exceptions using a predicated comparison
We only execute the FOR if we are writing the data
We only execute the BP if we are writing the data
392918 {
392921 } else {
392923 }
392924
392925
392937 }
392938
392939
392944 break;
392945 }
392946 }
392947
392953 }
392955
392956
392960 }
392961
392962
392968 }
392970
392973
392974
392978 }
392979 }
392980
392986 }
392990 }
static void FindBestFactorAndExponent(const T *input_vector, idx_t n_values, CompressionData &compression_data)
Definition duckdb.cpp:392879
◆ Compress() [2/2]
template<class T, bool EMPTY>
392995 {
392997 }
static void Compress(const T *input_vector, idx_t n_values, const uint16_t *vector_null_positions, idx_t nulls_count, CompressionData &compression_data)
Definition duckdb.cpp:392917
The documentation for this struct was generated from the following file: