OmniSciDB
a5dc49c757
|
#include <NoneEncoder.h>
Public Member Functions | |
NoneEncoder (Data_Namespace::AbstractBuffer *buffer) | |
size_t | getNumElemsForBytesEncodedDataAtIndices (const int8_t *index_data, const std::vector< size_t > &selected_idx, const size_t byte_limit) override |
std::shared_ptr< ChunkMetadata > | appendEncodedDataAtIndices (const int8_t *, int8_t *data, const std::vector< size_t > &selected_idx) override |
std::shared_ptr< ChunkMetadata > | appendEncodedData (const int8_t *, int8_t *data, const size_t start_idx, const size_t num_elements) override |
std::shared_ptr< ChunkMetadata > | appendData (int8_t *&src_data, const size_t num_elems_to_append, const SQLTypeInfo &, const bool replicating=false, const int64_t offset=-1) override |
void | getMetadata (const std::shared_ptr< ChunkMetadata > &chunkMetadata) override |
std::shared_ptr< ChunkMetadata > | getMetadata (const SQLTypeInfo &ti) override |
void | updateStats (const int64_t val, const bool is_null) override |
void | updateStats (const double val, const bool is_null) override |
void | updateStats (const int8_t *const src_data, const size_t num_elements) override |
void | updateStatsEncoded (const int8_t *const dst_data, const size_t num_elements) override |
void | updateStats (const std::vector< std::string > *const src_data, const size_t start_idx, const size_t num_elements) override |
void | updateStats (const std::vector< ArrayDatum > *const src_data, const size_t start_idx, const size_t num_elements) override |
void | reduceStats (const Encoder &that) override |
void | writeMetadata (FILE *f) override |
void | readMetadata (FILE *f) override |
bool | resetChunkStats (const ChunkStats &stats) override |
: Reset chunk level stats (min, max, nulls) using new values from the argument. More... | |
void | copyMetadata (const Encoder *copyFromEncoder) override |
void | resetChunkStats () override |
Public Member Functions inherited from Encoder | |
Encoder (Data_Namespace::AbstractBuffer *buffer) | |
virtual | ~Encoder () |
size_t | getNumElems () const |
void | setNumElems (const size_t num_elems) |
Public Attributes | |
T | dataMin |
T | dataMax |
bool | has_nulls |
Private Member Functions | |
std::shared_ptr< ChunkMetadata > | appendValidatedOrNonValidatedData (int8_t *&src_data, const size_t num_elems_to_append, const bool replicating, const int64_t offset, const bool is_validated_data) |
T | validateDataAndUpdateStats (const T &unencoded_data, const bool is_validated_data=false) |
void | updateStats (const int8_t *const src_data, const size_t num_elements, const bool is_validated_data) |
Additional Inherited Members | |
Static Public Member Functions inherited from Encoder | |
static Encoder * | Create (Data_Namespace::AbstractBuffer *buffer, const SQLTypeInfo sqlType) |
Protected Attributes inherited from Encoder | |
size_t | num_elems_ |
Data_Namespace::AbstractBuffer * | buffer_ |
DecimalOverflowValidator | decimal_overflow_validator_ |
DateDaysOverflowValidator | date_days_overflow_validator_ |
Definition at line 37 of file NoneEncoder.h.
|
inline |
Definition at line 39 of file NoneEncoder.h.
References NoneEncoder< T >::resetChunkStats().
|
inlineoverridevirtual |
Append data to the chunk buffer backing this encoder.
src_data | Source data for the append |
num_elems_to_append | Number of elements to append |
ti | SQL Type Info for the column TODO(adb): used? |
replicating | Pass one value and fill the chunk with it |
offset | Write data starting at a given offset. Default is -1 which indicates an append, an offset of 0 rewrites the chunk up to num_elems_to_append . |
Implements Encoder.
Definition at line 78 of file NoneEncoder.h.
References NoneEncoder< T >::appendValidatedOrNonValidatedData().
Referenced by NoneEncoder< T >::appendEncodedDataAtIndices().
|
inlineoverridevirtual |
Append encoded data to the chunk buffer backing this encoder.
index_data | - (optional) the index data of data to append |
data | - the data to append |
start_idx | - the position to start encoding from in the data array |
num_elements | - the number of elements to encode from the data array |
NOTE: index_data
must be non-null for varlen encoder types.
Implements Encoder.
Definition at line 70 of file NoneEncoder.h.
References NoneEncoder< T >::appendValidatedOrNonValidatedData(), and heavydb.dtypes::T.
|
inlineoverridevirtual |
Append selected encoded data to the chunk buffer backing this encoder.
index_data | - (optional) the index data of data to append |
data | - the data to append |
selected_idx | - which indices in the encoded data to append |
NOTE: index_data
must be non-null for varlen encoder types.
Implements Encoder.
Definition at line 52 of file NoneEncoder.h.
References NoneEncoder< T >::appendData(), shared::execute_over_contiguous_indices(), and heavydb.dtypes::T.
|
inlineprivate |
Definition at line 225 of file NoneEncoder.h.
References Data_Namespace::AbstractBuffer::append(), Encoder::buffer_, CHECK, CHECK_GE, gpu_enabled::fill(), NoneEncoder< T >::getMetadata(), Encoder::num_elems_, Data_Namespace::AbstractBuffer::reserve(), NoneEncoder< T >::resetChunkStats(), Data_Namespace::AbstractBuffer::size(), heavydb.dtypes::T, NoneEncoder< T >::updateStats(), NoneEncoder< T >::validateDataAndUpdateStats(), and Data_Namespace::AbstractBuffer::write().
Referenced by NoneEncoder< T >::appendData(), and NoneEncoder< T >::appendEncodedData().
|
inlineoverridevirtual |
Implements Encoder.
Definition at line 206 of file NoneEncoder.h.
References NoneEncoder< T >::dataMax, NoneEncoder< T >::dataMin, Encoder::getNumElems(), NoneEncoder< T >::has_nulls, and Encoder::num_elems_.
|
inlineoverridevirtual |
Reimplemented from Encoder.
Definition at line 87 of file NoneEncoder.h.
References NoneEncoder< T >::dataMax, NoneEncoder< T >::dataMin, Encoder::getMetadata(), and NoneEncoder< T >::has_nulls.
Referenced by NoneEncoder< T >::appendValidatedOrNonValidatedData().
|
inlineoverridevirtual |
Implements Encoder.
Definition at line 93 of file NoneEncoder.h.
References NoneEncoder< T >::dataMax, NoneEncoder< T >::dataMin, and NoneEncoder< T >::has_nulls.
|
inlineoverridevirtual |
Compute the maximum number of variable length encoded elements given a byte limit
index_data | - (optional) index data for the encoded type |
selected_idx | - which indices in the encoded data to consider |
byte_limit | - byte limit that must be respected |
NOTE: optional parameters above may be ignored by the implementation, but may or may not be required depending on the encoder type backing the implementation.
Implements Encoder.
Definition at line 43 of file NoneEncoder.h.
References UNREACHABLE.
|
inlineoverridevirtual |
Implements Encoder.
Definition at line 184 of file NoneEncoder.h.
References NoneEncoder< T >::dataMax, NoneEncoder< T >::dataMin, NoneEncoder< T >::has_nulls, Encoder::num_elems_, and heavydb.dtypes::T.
|
inlineoverridevirtual |
Implements Encoder.
Definition at line 167 of file NoneEncoder.h.
References NoneEncoder< T >::dataMax, NoneEncoder< T >::dataMin, and NoneEncoder< T >::has_nulls.
|
inlineoverridevirtual |
: Reset chunk level stats (min, max, nulls) using new values from the argument.
Reimplemented from Encoder.
Definition at line 192 of file NoneEncoder.h.
References NoneEncoder< T >::dataMax, NoneEncoder< T >::dataMin, ChunkStats::has_nulls, NoneEncoder< T >::has_nulls, ChunkStats::max, and ChunkStats::min.
|
inlineoverridevirtual |
Resets chunk metadata stats to their default values.
Implements Encoder.
Definition at line 214 of file NoneEncoder.h.
References NoneEncoder< T >::dataMax, NoneEncoder< T >::dataMin, and NoneEncoder< T >::has_nulls.
Referenced by NoneEncoder< T >::appendValidatedOrNonValidatedData(), and NoneEncoder< T >::NoneEncoder().
|
inlineoverridevirtual |
Implements Encoder.
Definition at line 100 of file NoneEncoder.h.
References NoneEncoder< T >::dataMax, NoneEncoder< T >::dataMin, NoneEncoder< T >::has_nulls, and heavydb.dtypes::T.
Referenced by NoneEncoder< T >::appendValidatedOrNonValidatedData(), and NoneEncoder< T >::updateStats().
|
inlineoverridevirtual |
Implements Encoder.
Definition at line 111 of file NoneEncoder.h.
References NoneEncoder< T >::dataMax, NoneEncoder< T >::dataMin, NoneEncoder< T >::has_nulls, and heavydb.dtypes::T.
|
inlineoverridevirtual |
Update statistics for data without appending.
src_data | - the data with which to update statistics |
num_elements | - the number of elements to scan in the data |
Implements Encoder.
Definition at line 121 of file NoneEncoder.h.
References NoneEncoder< T >::updateStats().
|
inlineoverridevirtual |
Update statistics for string data without appending.
src_data | - the string data with which to update statistics |
start_idx | - the offset into src_data to start the update |
num_elements | - the number of elements to scan in the string data |
Implements Encoder.
Definition at line 154 of file NoneEncoder.h.
References UNREACHABLE.
|
inlineoverridevirtual |
Update statistics for array data without appending.
src_data | - the array data with which to update statistics |
start_idx | - the offset into src_data to start the update |
num_elements | - the number of elements to scan in the array data |
Implements Encoder.
Definition at line 160 of file NoneEncoder.h.
References UNREACHABLE.
|
inlineprivate |
Definition at line 281 of file NoneEncoder.h.
References heavydb.dtypes::T, and NoneEncoder< T >::validateDataAndUpdateStats().
|
inlineoverridevirtual |
Update statistics for encoded data without appending.
dst_data | - the data with which to update statistics |
num_elements | - the number of elements to scan in the data |
Reimplemented from Encoder.
Definition at line 125 of file NoneEncoder.h.
References NoneEncoder< T >::dataMax, NoneEncoder< T >::dataMin, Encoder::decimal_overflow_validator_, NoneEncoder< T >::has_nulls, logger::init(), threading_serial::parallel_reduce(), heavydb.dtypes::T, and DecimalOverflowValidator::validate().
|
inlineprivate |
Definition at line 267 of file NoneEncoder.h.
References NoneEncoder< T >::dataMax, NoneEncoder< T >::dataMin, Encoder::decimal_overflow_validator_, NoneEncoder< T >::has_nulls, and DecimalOverflowValidator::validate().
Referenced by NoneEncoder< T >::appendValidatedOrNonValidatedData(), and NoneEncoder< T >::updateStats().
|
inlineoverridevirtual |
Implements Encoder.
Definition at line 176 of file NoneEncoder.h.
References NoneEncoder< T >::dataMax, NoneEncoder< T >::dataMin, NoneEncoder< T >::has_nulls, Encoder::num_elems_, and heavydb.dtypes::T.
T NoneEncoder< T >::dataMax |
Definition at line 221 of file NoneEncoder.h.
Referenced by NoneEncoder< T >::copyMetadata(), NoneEncoder< T >::getMetadata(), NoneEncoder< T >::readMetadata(), NoneEncoder< T >::reduceStats(), NoneEncoder< T >::resetChunkStats(), NoneEncoder< T >::updateStats(), NoneEncoder< T >::updateStatsEncoded(), NoneEncoder< T >::validateDataAndUpdateStats(), and NoneEncoder< T >::writeMetadata().
T NoneEncoder< T >::dataMin |
Definition at line 220 of file NoneEncoder.h.
Referenced by NoneEncoder< T >::copyMetadata(), NoneEncoder< T >::getMetadata(), NoneEncoder< T >::readMetadata(), NoneEncoder< T >::reduceStats(), NoneEncoder< T >::resetChunkStats(), NoneEncoder< T >::updateStats(), NoneEncoder< T >::updateStatsEncoded(), NoneEncoder< T >::validateDataAndUpdateStats(), and NoneEncoder< T >::writeMetadata().
bool NoneEncoder< T >::has_nulls |
Definition at line 222 of file NoneEncoder.h.
Referenced by NoneEncoder< T >::copyMetadata(), NoneEncoder< T >::getMetadata(), heavydb.thrift.ttypes.TColumnRange::read(), NoneEncoder< T >::readMetadata(), NoneEncoder< T >::reduceStats(), NoneEncoder< T >::resetChunkStats(), NoneEncoder< T >::updateStats(), NoneEncoder< T >::updateStatsEncoded(), NoneEncoder< T >::validateDataAndUpdateStats(), heavydb.thrift.ttypes.TColumnRange::write(), and NoneEncoder< T >::writeMetadata().