Class foreign_storage::ParquetArrayEncoder

class ParquetArrayEncoder : public foreign_storage::ParquetEncoder

Subclassed by foreign_storage::ParquetArrayImportEncoder, foreign_storage::ParquetFixedLengthArrayEncoder, foreign_storage::ParquetVariableLengthArrayEncoder

Public 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)
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)
void finalizeRowGroup()
std::shared_ptr<ChunkMetadata> getRowGroupMetadata(const parquet::RowGroupMetaData *group_metadata, const int parquet_column_index, const SQLTypeInfo &column_type)
virtual void disableMetadataStatsValidation()
virtual void initializeErrorTracking(const SQLTypeInfo &column_type)

Protected 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
virtual void appendArrayItem(const int64_t encoded_index)

Protected Attributes

size_t omnisci_data_type_byte_size_
std::shared_ptr<ParquetScalarEncoder> scalar_encoder_
std::vector<int8_t> data_buffer_bytes_

Protected Static Attributes

const int16_t non_null_def_level = 3
const int16_t item_null_def_level = 2
const int16_t empty_list_def_level = 1
const int16_t list_null_def_level = 0

Private Functions

void processArrayItem(const int16_t def_level, int64_t &encoded_index)
void encodeAllValues(const int8_t *values, const int64_t values_read)
void markArrayAsNull()
void markArrayAsEmpty()
void appendNullArrayItem()

Private Members

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_