OmniSciDB
a5dc49c757
|
#include <ParquetArrayEncoder.h>
Public Member Functions | |
ParquetArrayEncoder (Data_Namespace::AbstractBuffer *data_buffer, std::shared_ptr< ParquetScalarEncoder > scalar_encoder, const ColumnDescriptor *column_desciptor) | |
void | appendDataTrackErrors (const int16_t *def_levels, const int16_t *rep_levels, const int64_t values_read, const int64_t levels_read, int8_t *values) override |
void | appendData (const int16_t *def_levels, const int16_t *rep_levels, const int64_t values_read, const int64_t levels_read, int8_t *values) override |
void | finalizeRowGroup () |
std::shared_ptr< ChunkMetadata > | getRowGroupMetadata (const parquet::RowGroupMetaData *group_metadata, const int parquet_column_index, const SQLTypeInfo &column_type) override |
virtual void | disableMetadataStatsValidation () override |
virtual void | initializeErrorTracking () override |
virtual void | initializeColumnType (const SQLTypeInfo &column_type) override |
Public Member Functions inherited from foreign_storage::ParquetEncoder | |
ParquetEncoder (Data_Namespace::AbstractBuffer *buffer) | |
virtual | ~ParquetEncoder ()=default |
RejectedRowIndices | getRejectedRowIndices () const |
Protected Member Functions | |
virtual void | processLastArray () |
virtual void | appendArraysToBuffer () |
bool | isLastArrayNull () const |
bool | isLastArrayEmpty () const |
size_t | sizeOfLastArray () const |
int8_t * | resizeArrayDataBytes (const size_t additional_num_elements) |
virtual void | resetLastArrayMetadata () |
bool | isNewArray (const int16_t rep_level) const |
int8_t * | encodedDataAtIndex (const size_t index) |
void | updateMetadataForAppendedArrayItem (const int64_t encoded_index) |
virtual void | appendArrayItem (const int64_t encoded_index) |
virtual void | encodeAllValues (const int8_t *values, const int64_t values_read) |
Protected Attributes | |
size_t | omnisci_data_type_byte_size_ |
std::shared_ptr < ParquetScalarEncoder > | scalar_encoder_ |
std::vector< int8_t > | data_buffer_bytes_ |
Protected Attributes inherited from foreign_storage::ParquetEncoder | |
Data_Namespace::AbstractBuffer * | buffer_ |
bool | is_error_tracking_enabled_ |
RejectedRowIndices | invalid_indices_ |
size_t | current_chunk_offset_ |
SQLTypeInfo | column_type_ |
bool | validate_metadata_stats_ |
Static Protected Attributes | |
static const int16_t | non_null_def_level = 3 |
static const int16_t | item_null_def_level = 2 |
static const int16_t | empty_list_def_level = 1 |
static const int16_t | list_null_def_level = 0 |
Private Member Functions | |
void | processArrayItem (const int16_t def_level, int64_t &encoded_index) |
void | markArrayAsNull () |
void | markArrayAsEmpty () |
void | appendNullArrayItem () |
Private Attributes | |
std::vector< int8_t > | encode_buffer_ |
bool | has_assembly_started_ |
bool | is_null_array_ |
bool | is_empty_array_ |
size_t | num_elements_in_array_ |
size_t | num_array_assembled_ |
bool | is_invalid_array_ |
std::vector< bool > | is_valid_item_ |
Additional Inherited Members | |
Static Protected Member Functions inherited from foreign_storage::ParquetEncoder | |
static std::shared_ptr < ChunkMetadata > | createMetadata (const SQLTypeInfo &column_type) |
static void | throwNotNullViolation (const std::string &parquet_column_name) |
static void | validateNullCount (const std::string &parquet_column_name, int64_t null_count, const SQLTypeInfo &column_type) |
Definition at line 23 of file ParquetArrayEncoder.h.
|
inline |
Definition at line 25 of file ParquetArrayEncoder.h.
|
inlineprotectedvirtual |
Reimplemented in foreign_storage::ParquetArrayImportEncoder, and foreign_storage::ParquetArrayDetectEncoder.
Definition at line 171 of file ParquetArrayEncoder.h.
References encodedDataAtIndex(), resizeArrayDataBytes(), scalar_encoder_, and updateMetadataForAppendedArrayItem().
Referenced by foreign_storage::ParquetArrayImportEncoder::appendArrayItem(), and processArrayItem().
|
inlineprotectedvirtual |
Reimplemented in foreign_storage::ParquetArrayImportEncoder, foreign_storage::ParquetArrayDetectEncoder, and foreign_storage::ParquetVariableLengthArrayEncoder.
Definition at line 119 of file ParquetArrayEncoder.h.
References Data_Namespace::AbstractBuffer::append(), foreign_storage::ParquetEncoder::buffer_, and data_buffer_bytes_.
Referenced by foreign_storage::ParquetVariableLengthArrayEncoder::appendArraysToBuffer(), and finalizeRowGroup().
|
inlineoverridevirtual |
Implements foreign_storage::ParquetEncoder.
Reimplemented in foreign_storage::ParquetVariableLengthArrayEncoder.
Definition at line 57 of file ParquetArrayEncoder.h.
References CHECK, encodeAllValues(), isNewArray(), processArrayItem(), processLastArray(), and resetLastArrayMetadata().
Referenced by foreign_storage::ParquetVariableLengthArrayEncoder::appendData(), appendDataTrackErrors(), and foreign_storage::ParquetArrayImportEncoder::validateAndAppendData().
|
inlineoverridevirtual |
Implements foreign_storage::ParquetEncoder.
Definition at line 39 of file ParquetArrayEncoder.h.
References appendData(), CHECK, foreign_storage::ParquetEncoder::is_error_tracking_enabled_, is_valid_item_, and scalar_encoder_.
|
inlineprivate |
Definition at line 204 of file ParquetArrayEncoder.h.
References num_elements_in_array_, resizeArrayDataBytes(), and scalar_encoder_.
Referenced by processArrayItem().
|
inlineoverridevirtual |
Reimplemented from foreign_storage::ParquetEncoder.
Definition at line 95 of file ParquetArrayEncoder.h.
References foreign_storage::ParquetEncoder::disableMetadataStatsValidation(), and scalar_encoder_.
|
inlineprotectedvirtual |
Reimplemented in foreign_storage::ParquetArrayDetectEncoder.
Definition at line 177 of file ParquetArrayEncoder.h.
References encode_buffer_, omnisci_data_type_byte_size_, and scalar_encoder_.
Referenced by appendData(), and foreign_storage::ParquetArrayDetectEncoder::encodeAllValues().
|
inlineprotected |
Definition at line 160 of file ParquetArrayEncoder.h.
References encode_buffer_, and omnisci_data_type_byte_size_.
Referenced by foreign_storage::ParquetArrayDetectEncoder::appendArrayItem(), and appendArrayItem().
|
inline |
Definition at line 78 of file ParquetArrayEncoder.h.
References appendArraysToBuffer(), has_assembly_started_, processLastArray(), and resetLastArrayMetadata().
|
inlineoverridevirtual |
Reimplemented from foreign_storage::ParquetEncoder.
Reimplemented in foreign_storage::ParquetFixedLengthArrayEncoder.
Definition at line 85 of file ParquetArrayEncoder.h.
References scalar_encoder_.
Referenced by foreign_storage::ParquetFixedLengthArrayEncoder::getRowGroupMetadata().
|
inlineoverridevirtual |
Reimplemented from foreign_storage::ParquetEncoder.
Definition at line 105 of file ParquetArrayEncoder.h.
References SQLTypeInfo::get_elem_type(), foreign_storage::ParquetEncoder::initializeColumnType(), and scalar_encoder_.
|
inlineoverridevirtual |
Reimplemented from foreign_storage::ParquetEncoder.
Definition at line 100 of file ParquetArrayEncoder.h.
References foreign_storage::ParquetEncoder::initializeErrorTracking(), and scalar_encoder_.
|
inlineprotected |
Definition at line 126 of file ParquetArrayEncoder.h.
References is_empty_array_.
Referenced by foreign_storage::ParquetVariableLengthArrayEncoder::appendLastArrayOffset(), foreign_storage::ParquetFixedLengthArrayEncoder::appendNullArrayOrCheckArraySize(), foreign_storage::ParquetArrayImportEncoder::appendToArrayDatumBuffer(), and foreign_storage::ParquetArrayDetectEncoder::appendToDetectBuffer().
|
inlineprotected |
Definition at line 124 of file ParquetArrayEncoder.h.
References is_null_array_.
Referenced by foreign_storage::ParquetVariableLengthArrayEncoder::appendLastArrayOffset(), foreign_storage::ParquetFixedLengthArrayEncoder::appendNullArrayOrCheckArraySize(), foreign_storage::ParquetArrayImportEncoder::appendToArrayDatumBuffer(), foreign_storage::ParquetArrayDetectEncoder::appendToDetectBuffer(), and processLastArray().
|
inlineprotected |
Definition at line 156 of file ParquetArrayEncoder.h.
References has_assembly_started_.
Referenced by appendData().
|
inlineprivate |
Definition at line 202 of file ParquetArrayEncoder.h.
References is_empty_array_.
Referenced by processArrayItem().
|
inlineprivate |
Definition at line 200 of file ParquetArrayEncoder.h.
References is_null_array_.
Referenced by processArrayItem().
|
inlineprivate |
Definition at line 183 of file ParquetArrayEncoder.h.
References appendArrayItem(), appendNullArrayItem(), empty_list_def_level, has_assembly_started_, item_null_def_level, list_null_def_level, markArrayAsEmpty(), markArrayAsNull(), non_null_def_level, and UNREACHABLE.
Referenced by appendData().
|
inlineprotectedvirtual |
Reimplemented in foreign_storage::ParquetArrayImportEncoder, foreign_storage::ParquetArrayDetectEncoder, foreign_storage::ParquetVariableLengthArrayEncoder, and foreign_storage::ParquetFixedLengthArrayEncoder.
Definition at line 111 of file ParquetArrayEncoder.h.
References foreign_storage::ParquetEncoder::column_type_, SQLTypeInfo::get_notnull(), foreign_storage::ParquetEncoder::invalid_indices_, foreign_storage::ParquetEncoder::is_error_tracking_enabled_, is_invalid_array_, isLastArrayNull(), and num_array_assembled_.
Referenced by appendData(), finalizeRowGroup(), foreign_storage::ParquetFixedLengthArrayEncoder::processLastArray(), foreign_storage::ParquetVariableLengthArrayEncoder::processLastArray(), and foreign_storage::ParquetArrayDetectEncoder::processLastArray().
|
inlineprotectedvirtual |
Reimplemented in foreign_storage::ParquetArrayImportEncoder.
Definition at line 147 of file ParquetArrayEncoder.h.
References is_empty_array_, foreign_storage::ParquetEncoder::is_error_tracking_enabled_, is_invalid_array_, is_null_array_, and num_elements_in_array_.
Referenced by appendData(), finalizeRowGroup(), and foreign_storage::ParquetArrayImportEncoder::resetLastArrayMetadata().
|
inlineprotected |
Definition at line 130 of file ParquetArrayEncoder.h.
References data_buffer_bytes_, and omnisci_data_type_byte_size_.
Referenced by appendArrayItem(), appendNullArrayItem(), and foreign_storage::ParquetFixedLengthArrayEncoder::appendNullFixedLengthArray().
|
inlineprotected |
Definition at line 128 of file ParquetArrayEncoder.h.
References num_elements_in_array_.
Referenced by foreign_storage::ParquetFixedLengthArrayEncoder::appendNullArrayOrCheckArraySize(), and foreign_storage::ParquetArrayImportEncoder::appendToArrayDatumBuffer().
|
inlineprotected |
Definition at line 164 of file ParquetArrayEncoder.h.
References foreign_storage::ParquetEncoder::is_error_tracking_enabled_, is_invalid_array_, is_valid_item_, and num_elements_in_array_.
Referenced by foreign_storage::ParquetArrayDetectEncoder::appendArrayItem(), and appendArrayItem().
|
protected |
Definition at line 139 of file ParquetArrayEncoder.h.
Referenced by appendArraysToBuffer(), foreign_storage::ParquetVariableLengthArrayEncoder::appendLastArrayOffset(), foreign_storage::ParquetArrayImportEncoder::appendToArrayDatumBuffer(), resizeArrayDataBytes(), and foreign_storage::ParquetVariableLengthArrayEncoder::setFirstOffsetForBuffer().
|
staticprotected |
Definition at line 144 of file ParquetArrayEncoder.h.
Referenced by processArrayItem(), and foreign_storage::ParquetVariableLengthArrayEncoder::setFirstOffsetForBuffer().
|
private |
Definition at line 209 of file ParquetArrayEncoder.h.
Referenced by encodeAllValues(), and encodedDataAtIndex().
|
private |
Definition at line 210 of file ParquetArrayEncoder.h.
Referenced by finalizeRowGroup(), isNewArray(), and processArrayItem().
|
private |
Definition at line 212 of file ParquetArrayEncoder.h.
Referenced by isLastArrayEmpty(), markArrayAsEmpty(), and resetLastArrayMetadata().
|
private |
Definition at line 217 of file ParquetArrayEncoder.h.
Referenced by processLastArray(), resetLastArrayMetadata(), and updateMetadataForAppendedArrayItem().
|
private |
Definition at line 211 of file ParquetArrayEncoder.h.
Referenced by isLastArrayNull(), markArrayAsNull(), and resetLastArrayMetadata().
|
private |
Definition at line 218 of file ParquetArrayEncoder.h.
Referenced by appendDataTrackErrors(), and updateMetadataForAppendedArrayItem().
|
staticprotected |
Definition at line 143 of file ParquetArrayEncoder.h.
Referenced by processArrayItem().
|
staticprotected |
Definition at line 145 of file ParquetArrayEncoder.h.
Referenced by processArrayItem(), and foreign_storage::ParquetVariableLengthArrayEncoder::setFirstOffsetForBuffer().
|
staticprotected |
Definition at line 142 of file ParquetArrayEncoder.h.
Referenced by processArrayItem().
|
private |
Definition at line 216 of file ParquetArrayEncoder.h.
Referenced by processLastArray().
|
private |
Definition at line 213 of file ParquetArrayEncoder.h.
Referenced by appendNullArrayItem(), resetLastArrayMetadata(), sizeOfLastArray(), and updateMetadataForAppendedArrayItem().
|
protected |
Definition at line 137 of file ParquetArrayEncoder.h.
Referenced by foreign_storage::ParquetFixedLengthArrayEncoder::appendNullFixedLengthArray(), foreign_storage::ParquetArrayImportEncoder::appendToArrayDatumBuffer(), foreign_storage::ParquetArrayImportEncoder::convertToArrayDatum(), encodeAllValues(), encodedDataAtIndex(), foreign_storage::ParquetFixedLengthArrayEncoder::getRowGroupMetadata(), foreign_storage::ParquetFixedLengthArrayEncoder::ParquetFixedLengthArrayEncoder(), and resizeArrayDataBytes().
|
protected |
Definition at line 138 of file ParquetArrayEncoder.h.
Referenced by foreign_storage::ParquetArrayDetectEncoder::appendArrayItem(), appendArrayItem(), appendDataTrackErrors(), appendNullArrayItem(), foreign_storage::ParquetFixedLengthArrayEncoder::appendNullFixedLengthArray(), disableMetadataStatsValidation(), encodeAllValues(), getRowGroupMetadata(), initializeColumnType(), initializeErrorTracking(), and foreign_storage::ParquetArrayImportEncoder::validateAndAppendData().