OmniSciDB
a667adc9c8
|
#include <FixedLengthArrayNoneEncoder.h>
Public Member Functions | |
FixedLengthArrayNoneEncoder (AbstractBuffer *buffer, size_t as) | |
size_t | getNumElemsForBytesInsertData (const std::vector< ArrayDatum > *srcData, const int start_idx, const size_t numAppendElems, const size_t byteLimit, const bool replicating=false) |
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 |
std::shared_ptr< ChunkMetadata > | appendData (const std::vector< ArrayDatum > *srcData, const int start_idx, const size_t numAppendElems, const bool replicating=false) |
void | getMetadata (const std::shared_ptr< ChunkMetadata > &chunkMetadata) override |
std::shared_ptr< ChunkMetadata > | getMetadata (const SQLTypeInfo &ti) override |
void | updateStats (const int64_t, const bool) override |
void | updateStats (const double, const bool) override |
void | reduceStats (const Encoder &) 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 | writeMetadata (FILE *f) override |
void | readMetadata (FILE *f) override |
void | copyMetadata (const Encoder *copyFromEncoder) override |
void | updateMetadata (int8_t *array) |
bool | resetChunkStats (const ChunkStats &stats) override |
: Reset chunk level stats (min, max, nulls) using new values from the argument. More... | |
void | resetChunkStats () override |
![]() | |
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) |
Static Public Member Functions | |
static bool | is_null (const SQLTypeInfo &type, int8_t *array) |
![]() | |
static Encoder * | Create (Data_Namespace::AbstractBuffer *buffer, const SQLTypeInfo sqlType) |
Public Attributes | |
Datum | elem_min |
Datum | elem_max |
bool | has_nulls |
bool | initialized |
Private Member Functions | |
bool | is_null (int8_t *array) |
void | update_elem_stats (const ArrayDatum &array) |
Private Attributes | |
std::mutex | EncoderMutex_ |
size_t | array_size |
Additional Inherited Members | |
![]() | |
size_t | num_elems_ |
Data_Namespace::AbstractBuffer * | buffer_ |
DecimalOverflowValidator | decimal_overflow_validator_ |
DateDaysOverflowValidator | date_days_overflow_validator_ |
Definition at line 41 of file FixedLengthArrayNoneEncoder.h.
|
inline |
Definition at line 43 of file FixedLengthArrayNoneEncoder.h.
|
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 58 of file FixedLengthArrayNoneEncoder.h.
References UNREACHABLE.
Referenced by Chunk_NS::Chunk::appendData().
|
inline |
Definition at line 67 of file FixedLengthArrayNoneEncoder.h.
References Data_Namespace::AbstractBuffer::append(), array_size, Encoder::buffer_, CHECK_EQ, getMetadata(), i, Data_Namespace::AbstractBuffer::isDirty(), Encoder::num_elems_, Data_Namespace::AbstractBuffer::reserve(), Data_Namespace::AbstractBuffer::setDirty(), and update_elem_stats().
|
inlineoverridevirtual |
Implements Encoder.
Definition at line 152 of file FixedLengthArrayNoneEncoder.h.
References elem_max, elem_min, Encoder::getNumElems(), has_nulls, initialized, and Encoder::num_elems_.
|
inlineoverridevirtual |
Reimplemented from Encoder.
Definition at line 98 of file FixedLengthArrayNoneEncoder.h.
References elem_max, elem_min, Encoder::getMetadata(), and has_nulls.
Referenced by appendData().
|
inlineoverridevirtual |
Implements Encoder.
Definition at line 104 of file FixedLengthArrayNoneEncoder.h.
References elem_max, elem_min, and has_nulls.
|
inline |
Definition at line 46 of file FixedLengthArrayNoneEncoder.h.
References array_size.
Referenced by Chunk_NS::Chunk::getNumElemsForBytesInsertData().
|
inlinestatic |
Definition at line 166 of file FixedLengthArrayNoneEncoder.h.
References CHECK_EQ, SQLTypeInfo::get_compression(), SQLTypeInfo::get_notnull(), SQLTypeInfo::get_subtype(), kBIGINT, kBOOLEAN, kCHAR, kDATE, kDECIMAL, kDOUBLE, kENCODING_DICT, kFLOAT, kINT, kNUMERIC, kSMALLINT, kTEXT, kTIME, kTIMESTAMP, kTINYINT, kVARCHAR, NULL_ARRAY_BIGINT, NULL_ARRAY_BOOLEAN, NULL_ARRAY_DOUBLE, NULL_ARRAY_FLOAT, NULL_ARRAY_INT, NULL_ARRAY_SMALLINT, NULL_ARRAY_TINYINT, and UNREACHABLE.
Referenced by Fragmenter_Namespace::FixedLenArrayChunkConverter::convertToColumnarFormat(), and updateMetadata().
|
inlineprivate |
Definition at line 246 of file FixedLengthArrayNoneEncoder.h.
References Encoder::buffer_, Data_Namespace::AbstractBuffer::getSqlType(), and is_null().
Referenced by is_null().
|
inlineoverridevirtual |
Implements Encoder.
Definition at line 143 of file FixedLengthArrayNoneEncoder.h.
References elem_max, elem_min, has_nulls, initialized, and Encoder::num_elems_.
|
inlineoverridevirtual |
: Reset chunk level stats (min, max, nulls) using new values from the argument.
Reimplemented from Encoder.
Definition at line 220 of file FixedLengthArrayNoneEncoder.h.
References Encoder::buffer_, DatumEqual(), elem_max, elem_min, SQLTypeInfo::get_elem_type(), Data_Namespace::AbstractBuffer::getSqlType(), ChunkStats::has_nulls, has_nulls, ChunkStats::max, and ChunkStats::min.
|
inlineoverridevirtual |
Resets chunk metadata stats to their default values.
Implements Encoder.
Definition at line 232 of file FixedLengthArrayNoneEncoder.h.
References has_nulls, and initialized.
|
inlineprivate |
Definition at line 248 of file FixedLengthArrayNoneEncoder.h.
References Datum::bigintval, Datum::boolval, Encoder::buffer_, CHECK_EQ, Encoder::decimal_overflow_validator_, Datum::doubleval, elem_max, elem_min, Datum::floatval, SQLTypeInfo::get_compression(), SQLTypeInfo::get_subtype(), Data_Namespace::AbstractBuffer::getSqlType(), has_nulls, i, initialized, Datum::intval, kBIGINT, kBOOLEAN, kCHAR, kDATE, kDECIMAL, kDOUBLE, kENCODING_DICT, kFLOAT, kINT, kNUMERIC, kSMALLINT, kTEXT, kTIME, kTIMESTAMP, kTINYINT, kVARCHAR, NULL_BIGINT, NULL_BOOLEAN, NULL_DOUBLE, NULL_FLOAT, NULL_INT, NULL_SMALLINT, NULL_TINYINT, Datum::smallintval, Datum::tinyintval, UNREACHABLE, and DecimalOverflowValidator::validate().
Referenced by appendData(), updateMetadata(), and updateStats().
|
inline |
Definition at line 162 of file FixedLengthArrayNoneEncoder.h.
References array_size, is_null(), and update_elem_stats().
|
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 116 of file FixedLengthArrayNoneEncoder.h.
References UNREACHABLE.
|
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 120 of file FixedLengthArrayNoneEncoder.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 126 of file FixedLengthArrayNoneEncoder.h.
References update_elem_stats().
|
inlineoverridevirtual |
Implements Encoder.
Definition at line 134 of file FixedLengthArrayNoneEncoder.h.
References elem_max, elem_min, has_nulls, initialized, and Encoder::num_elems_.
|
private |
Definition at line 244 of file FixedLengthArrayNoneEncoder.h.
Referenced by appendData(), getNumElemsForBytesInsertData(), and updateMetadata().
Datum FixedLengthArrayNoneEncoder::elem_max |
Definition at line 238 of file FixedLengthArrayNoneEncoder.h.
Referenced by copyMetadata(), getMetadata(), readMetadata(), resetChunkStats(), update_elem_stats(), and writeMetadata().
Datum FixedLengthArrayNoneEncoder::elem_min |
Definition at line 237 of file FixedLengthArrayNoneEncoder.h.
Referenced by copyMetadata(), getMetadata(), readMetadata(), resetChunkStats(), update_elem_stats(), and writeMetadata().
|
private |
Definition at line 243 of file FixedLengthArrayNoneEncoder.h.
bool FixedLengthArrayNoneEncoder::has_nulls |
Definition at line 239 of file FixedLengthArrayNoneEncoder.h.
Referenced by copyMetadata(), getMetadata(), omnisci.thrift.ttypes.TColumnRange::read(), readMetadata(), resetChunkStats(), update_elem_stats(), omnisci.thrift.ttypes.TColumnRange::write(), and writeMetadata().
bool FixedLengthArrayNoneEncoder::initialized |
Definition at line 240 of file FixedLengthArrayNoneEncoder.h.
Referenced by copyMetadata(), readMetadata(), resetChunkStats(), update_elem_stats(), and writeMetadata().