OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
foreign_storage::ParquetRowGroupReader Class Reference
+ Collaboration diagram for foreign_storage::ParquetRowGroupReader:

Public Member Functions

 ParquetRowGroupReader (std::shared_ptr< parquet::ColumnReader > col_reader, const ColumnDescriptor *column_descriptor, const parquet::ColumnDescriptor *parquet_column_descriptor, ParquetEncoder *encoder, InvalidRowGroupIndices &invalid_indices, const int row_group_index, const int parquet_column_index, const parquet::ParquetFileReader *parquet_reader)
 
void readAndValidateRowGroup ()
 
void eraseInvalidRowGroupData (const InvalidRowGroupIndices &invalid_indices)
 

Private Attributes

std::shared_ptr
< parquet::ColumnReader > 
col_reader_
 
const ColumnDescriptorcolumn_descriptor_
 
const parquet::ColumnDescriptor * parquet_column_descriptor_
 
ParquetEncoderencoder_
 
ParquetImportEncoderimport_encoder
 
InvalidRowGroupIndicesinvalid_indices_
 
const int row_group_index_
 
const int parquet_column_index_
 
const parquet::ParquetFileReader * parquet_reader_
 

Detailed Description

Definition at line 2131 of file LazyParquetChunkLoader.cpp.

Constructor & Destructor Documentation

foreign_storage::ParquetRowGroupReader::ParquetRowGroupReader ( std::shared_ptr< parquet::ColumnReader >  col_reader,
const ColumnDescriptor column_descriptor,
const parquet::ColumnDescriptor *  parquet_column_descriptor,
ParquetEncoder encoder,
InvalidRowGroupIndices invalid_indices,
const int  row_group_index,
const int  parquet_column_index,
const parquet::ParquetFileReader *  parquet_reader 
)
inline

Definition at line 2133 of file LazyParquetChunkLoader.cpp.

References CHECK, and import_encoder.

2141  : col_reader_(col_reader)
2142  , column_descriptor_(column_descriptor)
2143  , parquet_column_descriptor_(parquet_column_descriptor)
2144  , encoder_(encoder)
2145  , invalid_indices_(invalid_indices)
2146  , row_group_index_(row_group_index)
2147  , parquet_column_index_(parquet_column_index)
2148  , parquet_reader_(parquet_reader) {
2149  import_encoder = dynamic_cast<ParquetImportEncoder*>(encoder);
2151  }
std::shared_ptr< parquet::ColumnReader > col_reader_
const parquet::ParquetFileReader * parquet_reader_
const parquet::ColumnDescriptor * parquet_column_descriptor_
#define CHECK(condition)
Definition: Logger.h:291

Member Function Documentation

void foreign_storage::ParquetRowGroupReader::eraseInvalidRowGroupData ( const InvalidRowGroupIndices invalid_indices)
inline

Definition at line 2187 of file LazyParquetChunkLoader.cpp.

References foreign_storage::ParquetImportEncoder::eraseInvalidIndicesInBuffer(), and import_encoder.

2187  {
2188  import_encoder->eraseInvalidIndicesInBuffer(invalid_indices);
2189  }
virtual void eraseInvalidIndicesInBuffer(const InvalidRowGroupIndices &invalid_indices)=0

+ Here is the call graph for this function:

void foreign_storage::ParquetRowGroupReader::readAndValidateRowGroup ( )
inline

Definition at line 2153 of file LazyParquetChunkLoader.cpp.

References foreign_storage::LazyParquetChunkLoader::batch_reader_num_elements, col_reader_, column_descriptor_, ColumnDescriptor::columnType, foreign_storage::ParquetBatchData::def_levels, encoder_, SQLTypeInfo::get_subtype(), import_encoder, invalid_indices_, SQLTypeInfo::is_array(), foreign_storage::ParquetBatchData::levels_read, parquet_column_descriptor_, parquet_column_index_, parquet_reader_, foreign_storage::ParquetBatchData::rep_levels, foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}::resize_values_buffer(), row_group_index_, foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}::validate_list_column_metadata_statistics(), foreign_storage::ParquetImportEncoder::validateAndAppendData(), foreign_storage::ParquetBatchData::values, and foreign_storage::ParquetBatchData::values_read.

2153  {
2154  while (col_reader_->HasNext()) {
2155  ParquetBatchData batch_data;
2157  column_descriptor_, parquet_column_descriptor_, batch_data.values);
2158  batch_data.levels_read =
2160  batch_data.def_levels.data(),
2161  batch_data.rep_levels.data(),
2162  reinterpret_cast<uint8_t*>(batch_data.values.data()),
2163  &batch_data.values_read,
2164  col_reader_.get());
2171  batch_data.def_levels.data(),
2172  batch_data.levels_read,
2174  import_encoder->validateAndAppendData(batch_data.def_levels.data(),
2175  batch_data.rep_levels.data(),
2176  batch_data.values_read,
2177  batch_data.levels_read,
2178  batch_data.values.data(),
2179  column_type,
2181  }
2182  if (auto array_encoder = dynamic_cast<ParquetArrayEncoder*>(encoder_)) {
2183  array_encoder->finalizeRowGroup();
2184  }
2185  }
std::shared_ptr< parquet::ColumnReader > col_reader_
HOST DEVICE SQLTypes get_subtype() const
Definition: sqltypes.h:392
const parquet::ParquetFileReader * parquet_reader_
const parquet::ColumnDescriptor * parquet_column_descriptor_
void validate_list_column_metadata_statistics(const parquet::ParquetFileReader *reader, const int row_group_index, const int column_index, const int16_t *def_levels, const int64_t num_levels, const parquet::ColumnDescriptor *parquet_column_descriptor)
virtual void validateAndAppendData(const int16_t *def_levels, const int16_t *rep_levels, const int64_t values_read, const int64_t levels_read, int8_t *values, const SQLTypeInfo &column_type, InvalidRowGroupIndices &invalid_indices)=0
void resize_values_buffer(const ColumnDescriptor *omnisci_column, const parquet::ColumnDescriptor *parquet_column, std::vector< int8_t > &values)
SQLTypeInfo columnType
bool is_array() const
Definition: sqltypes.h:585

+ Here is the call graph for this function:

Member Data Documentation

std::shared_ptr<parquet::ColumnReader> foreign_storage::ParquetRowGroupReader::col_reader_
private

Definition at line 2192 of file LazyParquetChunkLoader.cpp.

Referenced by readAndValidateRowGroup().

const ColumnDescriptor* foreign_storage::ParquetRowGroupReader::column_descriptor_
private

Definition at line 2193 of file LazyParquetChunkLoader.cpp.

Referenced by readAndValidateRowGroup().

ParquetEncoder* foreign_storage::ParquetRowGroupReader::encoder_
private

Definition at line 2195 of file LazyParquetChunkLoader.cpp.

Referenced by readAndValidateRowGroup().

ParquetImportEncoder* foreign_storage::ParquetRowGroupReader::import_encoder
private
InvalidRowGroupIndices& foreign_storage::ParquetRowGroupReader::invalid_indices_
private

Definition at line 2197 of file LazyParquetChunkLoader.cpp.

Referenced by readAndValidateRowGroup().

const parquet::ColumnDescriptor* foreign_storage::ParquetRowGroupReader::parquet_column_descriptor_
private

Definition at line 2194 of file LazyParquetChunkLoader.cpp.

Referenced by readAndValidateRowGroup().

const int foreign_storage::ParquetRowGroupReader::parquet_column_index_
private

Definition at line 2199 of file LazyParquetChunkLoader.cpp.

Referenced by readAndValidateRowGroup().

const parquet::ParquetFileReader* foreign_storage::ParquetRowGroupReader::parquet_reader_
private

Definition at line 2200 of file LazyParquetChunkLoader.cpp.

Referenced by readAndValidateRowGroup().

const int foreign_storage::ParquetRowGroupReader::row_group_index_
private

Definition at line 2198 of file LazyParquetChunkLoader.cpp.

Referenced by readAndValidateRowGroup().


The documentation for this class was generated from the following file: