OmniSciDB
a5dc49c757
|
#include <ForeignTableSchema.h>
Public Member Functions | |
ForeignTableSchema (const int32_t db_id, const ForeignTable *foreign_table) | |
const ColumnDescriptor * | getColumnDescriptor (const int column_id) const |
const ColumnDescriptor * | getLogicalColumn (const int column_id) const |
int | getParquetColumnIndex (const int column_id) const |
const std::list< const ColumnDescriptor * > & | getLogicalAndPhysicalColumns () const |
int | numLogicalAndPhysicalColumns () const |
const std::list< const ColumnDescriptor * > & | getLogicalColumns () const |
int | numLogicalColumns () const |
const ForeignTable * | getForeignTable () const |
Private Member Functions | |
std::vector< int >::const_iterator | getLogicalColumnIdIterator (const int column_id) const |
Private Attributes | |
std::list< const ColumnDescriptor * > | logical_and_physical_columns_ |
std::list< const ColumnDescriptor * > | logical_columns_ |
std::vector< int > | logical_column_ids_ |
const ForeignTable * | foreign_table_ |
std::shared_ptr < Catalog_Namespace::Catalog > | catalog_ |
Definition at line 26 of file ForeignTableSchema.h.
foreign_storage::ForeignTableSchema::ForeignTableSchema | ( | const int32_t | db_id, |
const ForeignTable * | foreign_table | ||
) |
Definition at line 21 of file ForeignTableSchema.cpp.
References catalog_, CHECK, foreign_table_, Catalog_Namespace::SysCatalog::getCatalog(), Catalog_Namespace::SysCatalog::instance(), logical_and_physical_columns_, logical_column_ids_, logical_columns_, and TableDescriptor::tableId.
const ColumnDescriptor * foreign_storage::ForeignTableSchema::getColumnDescriptor | ( | const int | column_id | ) | const |
Gets a pointer to the column descriptor object for the given column id.
Definition at line 36 of file ForeignTableSchema.cpp.
References catalog_, CHECK, foreign_table_, and TableDescriptor::tableId.
Referenced by getLogicalColumn(), foreign_storage::LazyParquetChunkLoader::loadRowGroups(), foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}::metadata_scan_rowgroup_interval(), foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}::populate_encoder_map_for_import(), and foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}::populate_encoder_map_for_metadata_scan().
const ForeignTable * foreign_storage::ForeignTableSchema::getForeignTable | ( | ) | const |
Definition at line 73 of file ForeignTableSchema.cpp.
References foreign_table_.
const std::list< const ColumnDescriptor * > & foreign_storage::ForeignTableSchema::getLogicalAndPhysicalColumns | ( | ) | const |
Gets all the logical and physical columns for the foreign table.
Definition at line 57 of file ForeignTableSchema.cpp.
References logical_and_physical_columns_.
Referenced by foreign_storage::ParquetImportBatchResult::getChunksAndDictionaries(), foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}::metadata_scan_rowgroup_interval(), foreign_storage::LazyParquetChunkLoader::metadataScan(), and foreign_storage::ParquetImportBatchResult::ParquetImportBatchResult().
const ColumnDescriptor * foreign_storage::ForeignTableSchema::getLogicalColumn | ( | const int | column_id | ) | const |
Gets the logical column that is associated with the given column id. Given column id can be for a physical column or logical column (in this case, the column descriptor for the same column is returned)
Definition at line 43 of file ForeignTableSchema.cpp.
References CHECK_LE, getColumnDescriptor(), and getLogicalColumnIdIterator().
Referenced by foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}::metadata_scan_rowgroup_interval().
|
private |
Definition at line 77 of file ForeignTableSchema.cpp.
References CHECK, logical_column_ids_, and gpu_enabled::upper_bound().
Referenced by getLogicalColumn(), and getParquetColumnIndex().
const std::list< const ColumnDescriptor * > & foreign_storage::ForeignTableSchema::getLogicalColumns | ( | ) | const |
Gets all the logical columns for the foreign table.
Definition at line 65 of file ForeignTableSchema.cpp.
References logical_columns_.
Referenced by foreign_storage::LazyParquetChunkLoader::loadRowGroups(), foreign_storage::InternalSystemDataWrapper::populateChunkMetadata(), and foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}::validate_column_mapping_and_row_group_metadata().
int foreign_storage::ForeignTableSchema::getParquetColumnIndex | ( | const int | column_id | ) | const |
Gets the Parquet column index that corresponds to the given column id.
Definition at line 49 of file ForeignTableSchema.cpp.
References CHECK_GE, getLogicalColumnIdIterator(), and logical_column_ids_.
Referenced by foreign_storage::LazyParquetChunkLoader::loadRowGroups(), foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}::metadata_scan_rowgroup_interval(), foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}::populate_encoder_map_for_import(), and foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}::populate_encoder_map_for_metadata_scan().
int foreign_storage::ForeignTableSchema::numLogicalAndPhysicalColumns | ( | ) | const |
Gets the total number of logical and physical columns for the foreign table.
Definition at line 61 of file ForeignTableSchema.cpp.
References logical_and_physical_columns_.
int foreign_storage::ForeignTableSchema::numLogicalColumns | ( | ) | const |
Gets the total number of logical columns for the foreign table.
Definition at line 69 of file ForeignTableSchema.cpp.
References logical_columns_.
Referenced by foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}::validate_number_of_columns().
|
private |
Definition at line 77 of file ForeignTableSchema.h.
Referenced by ForeignTableSchema(), and getColumnDescriptor().
|
private |
Definition at line 76 of file ForeignTableSchema.h.
Referenced by ForeignTableSchema(), getColumnDescriptor(), and getForeignTable().
|
private |
Definition at line 73 of file ForeignTableSchema.h.
Referenced by ForeignTableSchema(), getLogicalAndPhysicalColumns(), and numLogicalAndPhysicalColumns().
|
private |
Definition at line 75 of file ForeignTableSchema.h.
Referenced by ForeignTableSchema(), getLogicalColumnIdIterator(), and getParquetColumnIndex().
|
private |
Definition at line 74 of file ForeignTableSchema.h.
Referenced by ForeignTableSchema(), getLogicalColumns(), and numLogicalColumns().