OmniSciDB
a5dc49c757
|
#include <DateDaysEncoder.h>
Public Member Functions | |
DateDaysEncoder (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 &ti, 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 | 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 | copyMetadata (const Encoder *copyFromEncoder) 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 | resetChunkStats () override |
Public Member Functions inherited from Encoder | |
Encoder (Data_Namespace::AbstractBuffer *buffer) | |
virtual | ~Encoder () |
virtual void | updateStatsEncoded (const int8_t *const dst_data, const size_t num_elements) |
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 > | appendEncodedOrUnencodedData (int8_t *&src_data, const size_t num_elems_to_append, const SQLTypeInfo &ti, const bool replicating, const int64_t offset, const bool is_encoded) |
void | updateStatsWithAlreadyEncoded (const V &encoded_data) |
V | encodeDataAndUpdateStats (const T &unencoded_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 31 of file DateDaysEncoder.h.
|
inline |
Definition at line 33 of file DateDaysEncoder.h.
References DateDaysEncoder< T, V >::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 72 of file DateDaysEncoder.h.
References DateDaysEncoder< T, V >::appendEncodedOrUnencodedData().
|
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 63 of file DateDaysEncoder.h.
References DateDaysEncoder< T, V >::appendEncodedOrUnencodedData().
Referenced by DateDaysEncoder< T, V >::appendEncodedDataAtIndices().
|
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 46 of file DateDaysEncoder.h.
References DateDaysEncoder< T, V >::appendEncodedData(), and shared::execute_over_contiguous_indices().
|
inlineprivate |
Definition at line 193 of file DateDaysEncoder.h.
References Data_Namespace::AbstractBuffer::append(), Encoder::buffer_, CHECK, CHECK_GE, DateDaysEncoder< T, V >::encodeDataAndUpdateStats(), DateDaysEncoder< T, V >::getMetadata(), Encoder::num_elems_, Data_Namespace::AbstractBuffer::reserve(), DateDaysEncoder< T, V >::resetChunkStats(), Data_Namespace::AbstractBuffer::size(), heavydb.dtypes::T, DateDaysEncoder< T, V >::updateStatsWithAlreadyEncoded(), and Data_Namespace::AbstractBuffer::write().
Referenced by DateDaysEncoder< T, V >::appendData(), and DateDaysEncoder< T, V >::appendEncodedData().
|
inlineoverridevirtual |
Implements Encoder.
Definition at line 144 of file DateDaysEncoder.h.
References DateDaysEncoder< T, V >::dataMax, DateDaysEncoder< T, V >::dataMin, Encoder::getNumElems(), DateDaysEncoder< T, V >::has_nulls, and Encoder::num_elems_.
|
inlineprivate |
Definition at line 255 of file DateDaysEncoder.h.
References DateDaysEncoder< T, V >::dataMax, DateDaysEncoder< T, V >::dataMin, Encoder::date_days_overflow_validator_, DateConverters::get_epoch_days_from_seconds(), DateConverters::get_epoch_seconds_from_days(), DateDaysEncoder< T, V >::has_nulls, heavydb.dtypes::T, and DateDaysOverflowValidator::validate().
Referenced by DateDaysEncoder< T, V >::appendEncodedOrUnencodedData(), and DateDaysEncoder< T, V >::updateStats().
|
inlineoverridevirtual |
Reimplemented from Encoder.
Definition at line 81 of file DateDaysEncoder.h.
References DateDaysEncoder< T, V >::dataMax, DateDaysEncoder< T, V >::dataMin, Encoder::getMetadata(), and DateDaysEncoder< T, V >::has_nulls.
Referenced by DateDaysEncoder< T, V >::appendEncodedOrUnencodedData().
|
inlineoverridevirtual |
Implements Encoder.
Definition at line 87 of file DateDaysEncoder.h.
References DateDaysEncoder< T, V >::dataMax, DateDaysEncoder< T, V >::dataMin, and DateDaysEncoder< T, V >::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 37 of file DateDaysEncoder.h.
References UNREACHABLE.
|
inlineoverridevirtual |
Implements Encoder.
Definition at line 160 of file DateDaysEncoder.h.
References DateDaysEncoder< T, V >::dataMax, DateDaysEncoder< T, V >::dataMin, DateDaysEncoder< T, V >::has_nulls, Encoder::num_elems_, and heavydb.dtypes::T.
|
inlineoverridevirtual |
Implements Encoder.
Definition at line 135 of file DateDaysEncoder.h.
References DateDaysEncoder< T, V >::dataMax, DateDaysEncoder< T, V >::dataMin, and DateDaysEncoder< T, V >::has_nulls.
|
inlineoverridevirtual |
: Reset chunk level stats (min, max, nulls) using new values from the argument.
Reimplemented from Encoder.
Definition at line 168 of file DateDaysEncoder.h.
References DateDaysEncoder< T, V >::dataMax, DateDaysEncoder< T, V >::dataMin, ChunkStats::has_nulls, DateDaysEncoder< T, V >::has_nulls, ChunkStats::max, and ChunkStats::min.
|
inlineoverridevirtual |
Resets chunk metadata stats to their default values.
Implements Encoder.
Definition at line 182 of file DateDaysEncoder.h.
References DateDaysEncoder< T, V >::dataMax, DateDaysEncoder< T, V >::dataMin, and DateDaysEncoder< T, V >::has_nulls.
Referenced by DateDaysEncoder< T, V >::appendEncodedOrUnencodedData(), and DateDaysEncoder< T, V >::DateDaysEncoder().
|
inlineoverridevirtual |
Implements Encoder.
Definition at line 94 of file DateDaysEncoder.h.
References DateDaysEncoder< T, V >::dataMax, DateDaysEncoder< T, V >::dataMin, DateDaysEncoder< T, V >::has_nulls, and heavydb.dtypes::T.
|
inlineoverridevirtual |
Implements Encoder.
Definition at line 105 of file DateDaysEncoder.h.
References DateDaysEncoder< T, V >::dataMax, DateDaysEncoder< T, V >::dataMin, DateDaysEncoder< T, V >::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 115 of file DateDaysEncoder.h.
References DateDaysEncoder< T, V >::encodeDataAndUpdateStats(), and heavydb.dtypes::T.
|
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 122 of file DateDaysEncoder.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 128 of file DateDaysEncoder.h.
References UNREACHABLE.
|
inlineprivate |
Definition at line 245 of file DateDaysEncoder.h.
References DateDaysEncoder< T, V >::dataMax, DateDaysEncoder< T, V >::dataMin, DateConverters::get_epoch_seconds_from_days(), DateDaysEncoder< T, V >::has_nulls, and heavydb.dtypes::T.
Referenced by DateDaysEncoder< T, V >::appendEncodedOrUnencodedData().
|
inlineoverridevirtual |
Implements Encoder.
Definition at line 152 of file DateDaysEncoder.h.
References DateDaysEncoder< T, V >::dataMax, DateDaysEncoder< T, V >::dataMin, DateDaysEncoder< T, V >::has_nulls, Encoder::num_elems_, and heavydb.dtypes::T.
T DateDaysEncoder< T, V >::dataMax |
Definition at line 189 of file DateDaysEncoder.h.
Referenced by DateDaysEncoder< T, V >::copyMetadata(), DateDaysEncoder< T, V >::encodeDataAndUpdateStats(), DateDaysEncoder< T, V >::getMetadata(), DateDaysEncoder< T, V >::readMetadata(), DateDaysEncoder< T, V >::reduceStats(), DateDaysEncoder< T, V >::resetChunkStats(), DateDaysEncoder< T, V >::updateStats(), DateDaysEncoder< T, V >::updateStatsWithAlreadyEncoded(), and DateDaysEncoder< T, V >::writeMetadata().
T DateDaysEncoder< T, V >::dataMin |
Definition at line 188 of file DateDaysEncoder.h.
Referenced by DateDaysEncoder< T, V >::copyMetadata(), DateDaysEncoder< T, V >::encodeDataAndUpdateStats(), DateDaysEncoder< T, V >::getMetadata(), DateDaysEncoder< T, V >::readMetadata(), DateDaysEncoder< T, V >::reduceStats(), DateDaysEncoder< T, V >::resetChunkStats(), DateDaysEncoder< T, V >::updateStats(), DateDaysEncoder< T, V >::updateStatsWithAlreadyEncoded(), and DateDaysEncoder< T, V >::writeMetadata().
bool DateDaysEncoder< T, V >::has_nulls |
Definition at line 190 of file DateDaysEncoder.h.
Referenced by DateDaysEncoder< T, V >::copyMetadata(), DateDaysEncoder< T, V >::encodeDataAndUpdateStats(), DateDaysEncoder< T, V >::getMetadata(), heavydb.thrift.ttypes.TColumnRange::read(), DateDaysEncoder< T, V >::readMetadata(), DateDaysEncoder< T, V >::reduceStats(), DateDaysEncoder< T, V >::resetChunkStats(), DateDaysEncoder< T, V >::updateStats(), DateDaysEncoder< T, V >::updateStatsWithAlreadyEncoded(), heavydb.thrift.ttypes.TColumnRange::write(), and DateDaysEncoder< T, V >::writeMetadata().