Class FixedLengthArrayNoneEncoder¶
-
class
FixedLengthArrayNoneEncoder
: public Encoder¶ Public Functions
-
FixedLengthArrayNoneEncoder
(AbstractBuffer *buffer, size_t as)¶
-
size_t
getNumElemsForBytesEncodedDataAtIndices
(const int8_t *index_data, const std::vector<size_t> &selected_idx, const size_t byte_limit)¶ Compute the maximum number of variable length encoded elements given a byte limit
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.
- Return
the number of elements
- Parameters
index_data
: - (optional) index data for the encoded typeselected_idx
: - which indices in the encoded data to considerbyte_limit
: - byte limit that must be respected
-
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>
appendEncodedDataAtIndices
(const int8_t *index_data, int8_t *data, const std::vector<size_t> &selected_idx)¶ Append selected encoded data to the chunk buffer backing this encoder.
NOTE:
index_data
must be non-null for varlen encoder types.- Return
updated chunk metadata for the chunk buffer backing this encoder
- Parameters
index_data
: - (optional) the index data of data to appenddata
: - the data to appendselected_idx
: - which indices in the encoded data to append
-
std::shared_ptr<ChunkMetadata>
appendEncodedData
(const int8_t *index_data, int8_t *data, const size_t start_idx, const size_t num_elements)¶ Append encoded data to the chunk buffer backing this encoder.
NOTE:
index_data
must be non-null for varlen encoder types.- Return
updated chunk metadata for the chunk buffer backing this encoder
- Parameters
index_data
: - (optional) the index data of data to appenddata
: - the data to appendstart_idx
: - the position to start encoding from in thedata
arraynum_elements
: - the number of elements to encode from thedata
array
-
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)¶ Append data to the chunk buffer backing this encoder.
- Parameters
src_data
: Source data for the appendnum_elems_to_append
: Number of elements to appendti
: SQL Type Info for the column TODO(adb): used?replicating
: Pass one value and fill the chunk with itoffset
: Write data starting at a given offset. Default is -1 which indicates an append, an offset of 0 rewrites the chunk up tonum_elems_to_append
.
-
std::shared_ptr<ChunkMetadata>
appendData
(const std::vector<ArrayDatum> *srcData, const int start_idx, const size_t numAppendElems, const bool replicating = false)¶
-
std::shared_ptr<ChunkMetadata>
getMetadata
(const SQLTypeInfo &ti)¶
-
void
updateStats
(const int64_t, const bool)¶
-
void
updateStats
(const double, const bool)¶
-
void
updateStats
(const int8_t *const src_data, const size_t num_elements)¶ Update statistics for data without appending.
- Parameters
src_data
: - the data with which to update statisticsnum_elements
: - the number of elements to scan in the data
-
void
updateStats
(const std::vector<std::string> *const src_data, const size_t start_idx, const size_t num_elements)¶ Update statistics for string data without appending.
- Parameters
src_data
: - the string data with which to update statisticsstart_idx
: - the offset intosrc_data
to start the updatenum_elements
: - the number of elements to scan in the string data
-
void
updateStats
(const std::vector<ArrayDatum> *const src_data, const size_t start_idx, const size_t num_elements)¶ Update statistics for array data without appending.
- Parameters
src_data
: - the array data with which to update statisticsstart_idx
: - the offset intosrc_data
to start the updatenum_elements
: - the number of elements to scan in the array data
-
void
writeMetadata
(FILE *f)¶
-
void
readMetadata
(FILE *f)¶
-
void
updateMetadata
(int8_t *array)¶
-
bool
resetChunkStats
(const ChunkStats&)¶ : Reset chunk level stats (min, max, nulls) using new values from the argument.
- Return
: True if an update occurred and the chunk needs to be flushed. False otherwise. Default false if metadata update is unsupported. Only reset chunk stats if the incoming stats differ from the current stats.
-
void
resetChunkStats
()¶ Resets chunk metadata stats to their default values.
Public Static Functions
-
static bool
is_null
(const SQLTypeInfo &type, int8_t *array)¶
-