OmniSciDB  ca0c39ec8f
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TableDescriptor Struct Reference

#include <TableDescriptor.h>

+ Inheritance diagram for TableDescriptor:
+ Collaboration diagram for TableDescriptor:

Public Member Functions

 TableDescriptor ()
 
virtual ~TableDescriptor ()=default
 
bool isForeignTable () const
 
bool isTemporaryTable () const
 
std::vector< int > getTableChunkKey (const int getCurrentDBId) const
 

Public Attributes

int32_t tableId
 
int32_t shard
 
std::string tableName
 
int32_t userId
 
int32_t nColumns
 
bool isView
 
std::string viewSQL
 
std::string fragments
 
Fragmenter_Namespace::FragmenterType fragType
 
int32_t maxFragRows
 
int64_t maxChunkSize
 
int32_t fragPageSize
 
int64_t maxRows
 
std::string partitions
 
std::string keyMetainfo
 
std::shared_ptr
< Fragmenter_Namespace::AbstractFragmenter
fragmenter
 
int32_t nShards
 
int shardedColumnId
 
int sortedColumnId
 
Data_Namespace::MemoryLevel persistenceLevel
 
bool hasDeletedCol
 
std::vector< int > columnIdBySpi_
 
std::string storageType
 
int32_t maxRollbackEpochs
 
bool is_system_table
 
bool is_in_memory_system_table
 
std::shared_ptr< std::mutex > mutex_
 

Detailed Description

Definition at line 43 of file TableDescriptor.h.

Constructor & Destructor Documentation

TableDescriptor::TableDescriptor ( )
inline

Definition at line 84 of file TableDescriptor.h.

85  : tableId(-1)
86  , shard(-1)
87  , nShards(0)
88  , shardedColumnId(0)
89  , sortedColumnId(0)
91  , hasDeletedCol(true)
93  , is_system_table(false)
95  , mutex_(std::make_shared<std::mutex>()) {}
int32_t maxRollbackEpochs
std::shared_ptr< std::mutex > mutex_
bool is_in_memory_system_table
#define DEFAULT_MAX_ROLLBACK_EPOCHS
specifies the content in-memory of a row in the table metadata table
Data_Namespace::MemoryLevel persistenceLevel
virtual TableDescriptor::~TableDescriptor ( )
virtualdefault

Member Function Documentation

std::vector<int> TableDescriptor::getTableChunkKey ( const int  getCurrentDBId) const
inline

Definition at line 105 of file TableDescriptor.h.

References fragmenter, and tableId.

Referenced by Executor::clearExternalCaches().

105  {
106  std::vector<int> table_chunk_key_prefix;
107  if (fragmenter) {
108  table_chunk_key_prefix = fragmenter->getFragmentsForQuery().chunkKeyPrefix;
109  } else {
110  table_chunk_key_prefix.push_back(getCurrentDBId);
111  table_chunk_key_prefix.push_back(tableId);
112  }
113  return table_chunk_key_prefix;
114  }
std::shared_ptr< Fragmenter_Namespace::AbstractFragmenter > fragmenter

+ Here is the caller graph for this function:

bool TableDescriptor::isForeignTable ( ) const
inline

Definition at line 99 of file TableDescriptor.h.

References StorageType::FOREIGN_TABLE, and storageType.

Referenced by anonymous_namespace{DBHandler.cpp}::get_refresh_info(), foreign_storage::anonymous_namespace{InternalCatalogDataWrapper.cpp}::get_table_type(), Catalog_Namespace::Catalog::getAllPersistedTableAndShardIds(), system_validator::should_validate_epoch(), and QueryPlanDagChecker::visit().

std::string storageType
static constexpr char const * FOREIGN_TABLE

+ Here is the caller graph for this function:

bool TableDescriptor::isTemporaryTable ( ) const
inline

Definition at line 101 of file TableDescriptor.h.

References Data_Namespace::CPU_LEVEL, and persistenceLevel.

Referenced by foreign_storage::anonymous_namespace{InternalCatalogDataWrapper.cpp}::get_table_type(), Catalog_Namespace::Catalog::getAllPersistedTableAndShardIds(), system_validator::should_validate_epoch(), and QueryPlanDagChecker::visit().

101  {
103  }
Data_Namespace::MemoryLevel persistenceLevel

+ Here is the caller graph for this function:

Member Data Documentation

std::vector<int> TableDescriptor::columnIdBySpi_
std::shared_ptr<std::mutex> TableDescriptor::mutex_
int32_t TableDescriptor::tableId

tableId starts at 0 for valid tables.

Definition at line 44 of file TableDescriptor.h.

Referenced by lockmgr::TableDataLockContainer< WriteLock >::acquire(), lockmgr::TableDataLockContainer< ReadLock >::acquire(), lockmgr::TableInsertLockContainer< WriteLock >::acquire(), lockmgr::TableInsertLockContainer< ReadLock >::acquire(), Analyzer::RangeTableEntry::add_all_column_descs(), foreign_storage::anonymous_namespace{AbstractTextFileDataWrapper.cpp}::add_placeholder_metadata(), anonymous_namespace{DdlCommandExecutor.cpp}::add_table_details(), Catalog_Namespace::Catalog::addColumn(), Catalog_Namespace::Catalog::addTableToMap(), Catalog_Namespace::Catalog::alterPhysicalTableMetadata(), Catalog_Namespace::Catalog::alterTableMetadata(), Parser::InsertStmt::analyze(), RelModify::applyUpdateModificationsToInputNode(), Catalog_Namespace::Catalog::buildTablesMapUnlocked(), Parser::AddColumnStmt::check_executable(), checkPermissionForTables(), UpdelRoll::commitUpdate(), compare_td_id(), anonymous_namespace{ForeignDataImporter.cpp}::create_fragment_buffers(), foreign_storage::ParquetDataWrapper::createRenderGroupAnalyzers(), foreign_storage::AbstractTextFileDataWrapper::createRenderGroupAnalyzers(), Catalog_Namespace::Catalog::createShardedTable(), Catalog_Namespace::Catalog::createTable(), DataframeTableDescriptor::DataframeTableDescriptor(), Catalog_Namespace::Catalog::deleteTableCatalogMetadata(), Catalog_Namespace::Catalog::doTruncateTable(), Catalog_Namespace::Catalog::dropColumn(), Catalog_Namespace::Catalog::dropTable(), Catalog_Namespace::Catalog::dumpCreateTableUnlocked(), Catalog_Namespace::Catalog::dumpSchema(), TableArchiver::dumpTable(), Catalog_Namespace::Catalog::eraseTableMetadata(), Catalog_Namespace::Catalog::eraseTablePhysicalData(), Parser::OptimizeTableStmt::execute(), Parser::RenameColumnStmt::execute(), Parser::AddColumnStmt::execute(), Parser::DropColumnStmt::execute(), Parser::AlterTableParamStmt::execute(), Catalog_Namespace::Catalog::executeDropTableSqliteQueries(), Executor::executeUpdate(), Analyzer::RangeTableEntry::expand_star_in_targetlist(), import_export::ForeignDataImporter::finalize(), StorageIOFacility::TransactionParameters::finalizeTransaction(), foreign_storage::ForeignTable::ForeignTable(), foreign_storage::ForeignTableSchema::ForeignTableSchema(), Catalog_Namespace::Catalog::gatherAdditionalInfo(), anonymous_namespace{DdlCommandExecutor.cpp}::get_agg_storage_stats(), Fragmenter_Namespace::get_chunks(), Analyzer::RangeTableEntry::get_column_desc(), anonymous_namespace{QueryPlanDagExtractor.cpp}::get_input_idx(), foreign_storage::anonymous_namespace{InternalCatalogDataWrapper.cpp}::get_table_ddl(), Analyzer::RangeTableEntry::get_table_id(), Catalog_Namespace::Catalog::getAllColumnMetadataForTableImpl(), getChunkAccessorTable(), Fragmenter_Namespace::InsertOrderFragmenter::getChunksForAllColumns(), foreign_storage::ForeignTableSchema::getColumnDescriptor(), TableOptimizer::getDeletedColumnStats(), Catalog_Namespace::Catalog::getDictionaryToColumnMapping(), Catalog_Namespace::Catalog::getPhysicalTablesDescriptors(), Catalog_Namespace::Catalog::getShardColumnMetadataForTable(), getTableChunkKey(), Parser::getTableChunkKey(), Catalog_Namespace::Catalog::getTableDictDirectories(), import_export::Importer::importDelimited(), import_export::Importer::importGDALGeo(), import_export::ForeignDataImporter::importGeneral(), import_export::Loader::init(), foreign_storage::ParquetDataWrapper::initializeChunkBuffers(), Catalog_Namespace::Catalog::instantiateFragmenter(), foreign_storage::AbstractTextFileDataWrapper::iterativeFileScan(), anonymous_namespace{ForeignDataImporter.cpp}::load_foreign_data_buffers(), foreign_storage::ParquetDataWrapper::loadBuffersUsingLazyParquetChunkLoader(), foreign_storage::AbstractTextFileDataWrapper::populateChunkBuffers(), foreign_storage::AbstractTextFileDataWrapper::populateChunkMapForColumns(), foreign_storage::InternalSystemDataWrapper::populateChunkMetadata(), foreign_storage::AbstractTextFileDataWrapper::populateChunkMetadata(), Parser::InsertIntoTableAsSelectStmt::populateData(), foreign_storage::ParquetImportBatchResult::populateInsertData(), TableOptimizer::recomputeColumnMetadata(), TableOptimizer::recomputeMetadata(), foreign_storage::refresh_foreign_table_unlocked(), foreign_storage::LogFileBufferParser::regexMatchColumns(), ForeignStorageInterface::registerTable(), AlterForeignTableCommand::renameColumn(), Catalog_Namespace::Catalog::renameColumn(), Catalog_Namespace::Catalog::renameTable(), TableArchiver::restoreTable(), Catalog_Namespace::Catalog::serializeTableJsonUnlocked(), Catalog_Namespace::Catalog::setForeignTableProperty(), RelScan::toHash(), foreign_storage::ParquetDataWrapper::updateChunkMetadataForFragment(), Fragmenter_Namespace::InsertOrderFragmenter::updateColumn(), Fragmenter_Namespace::InsertOrderFragmenter::updateColumns(), foreign_storage::AbstractTextFileDataWrapper::updateMetadata(), TableOptimizer::vacuumDeletedRows(), TableOptimizer::vacuumFragments(), TableOptimizer::vacuumFragmentsAboveMinSelectivity(), and anonymous_namespace{QueryPhysicalInputsCollector.cpp}::RelAlgPhysicalTableInputsVisitor::visit().

std::string TableDescriptor::tableName

tableName is the name of the table table -must be unique

Definition at line 46 of file TableDescriptor.h.

Referenced by lockmgr::TableDataLockContainer< WriteLock >::acquire(), lockmgr::TableDataLockContainer< ReadLock >::acquire(), lockmgr::TableInsertLockContainer< WriteLock >::acquire(), lockmgr::TableInsertLockContainer< ReadLock >::acquire(), anonymous_namespace{DdlCommandExecutor.cpp}::add_table_details(), Catalog_Namespace::Catalog::addTableToMap(), Catalog_Namespace::Catalog::alterTableMetadata(), Catalog_Namespace::Catalog::buildTablesMapUnlocked(), Parser::check_alter_table_privilege(), anonymous_namespace{DBHandler.cpp}::create_thrift_obj_from_custom_expr(), Catalog_Namespace::Catalog::createShardedTable(), Catalog_Namespace::Catalog::createTable(), DataframeTableDescriptor::DataframeTableDescriptor(), Parser::anonymous_namespace{ParserNode.cpp}::disable_foreign_tables(), Catalog_Namespace::Catalog::dropTable(), Catalog_Namespace::Catalog::dumpCreateTableUnlocked(), TableArchiver::dumpTable(), Catalog_Namespace::Catalog::eraseTableMetadata(), ShowCreateTableCommand::execute(), Parser::CreateTableStmt::execute(), Parser::CreateDataframeStmt::execute(), Parser::CreateTableAsSelectStmt::execute(), Parser::CopyTableStmt::execute(), Parser::CreateViewStmt::execute(), Catalog_Namespace::Catalog::filterTableByTypeAndUser(), Catalog_Namespace::Catalog::gatherAdditionalInfo(), Analyzer::RangeTableEntry::get_table_name(), getChunkAccessorTable(), foreign_storage::ParquetDataWrapper::getDataPreview(), foreign_storage::ParquetDataWrapper::getRowGroupMetadataForFilePaths(), Catalog_Namespace::Catalog::getSystemTableSchema(), Catalog_Namespace::Catalog::getTableNamesForUser(), Catalog_Namespace::Catalog::getTablesMetadataForUser(), DBHandler::hasTableAccessPrivileges(), EmbeddedDatabase::DBEngineImpl::importArrowTable(), import_export::Importer::importDelimited(), import_export::Importer::importGDALGeo(), import_export::ForeignDataImporter::importGeneral(), foreign_storage::InternalCatalogDataWrapper::initializeObjectsForTable(), foreign_storage::InternalMemoryStatsDataWrapper::initializeObjectsForTable(), Catalog_Namespace::Catalog::instantiateFragmenter(), foreign_storage::ParquetDataWrapper::loadBuffersUsingLazyParquetChunkLoader(), import_export::Loader::loadToShard(), foreign_storage::InternalSystemDataWrapper::populateChunkBuffers(), foreign_storage::InternalCatalogDataWrapper::populateChunkBuffersForTable(), foreign_storage::InternalMemoryStatsDataWrapper::populateChunkBuffersForTable(), foreign_storage::InternalSystemDataWrapper::populateChunkMetadata(), Catalog_Namespace::Catalog::reassignOwners(), TableOptimizer::recomputeMetadata(), Catalog_Namespace::Catalog::recreateSystemTableIfUpdated(), foreign_storage::refresh_foreign_table_unlocked(), foreign_storage::LogFileBufferParser::regexMatchColumns(), Catalog_Namespace::Catalog::reloadTableMetadataUnlocked(), Catalog_Namespace::Catalog::renameColumn(), Catalog_Namespace::Catalog::renamePhysicalTable(), Catalog_Namespace::Catalog::renameTable(), TableArchiver::restoreTable(), Catalog_Namespace::Catalog::serializeTableJsonUnlocked(), ddl_utils::set_default_table_attributes(), Catalog_Namespace::Catalog::setColumnDictionary(), Catalog_Namespace::Catalog::setColumnSharedDictionary(), Catalog_Namespace::Catalog::setForeignTableProperty(), foreign_storage::anonymous_namespace{AbstractTextFileDataWrapper.cpp}::throw_fragment_id_out_of_bounds_error(), RelScan::toHash(), RelModify::toHash(), RelScan::toString(), RelModify::toString(), DBHandler::user_can_access_table(), Parser::anonymous_namespace{ParserNode.cpp}::user_can_access_table(), ddl_utils::validate_table_type(), and foreign_storage::AbstractFileStorageDataWrapper::validateFilePathOptionKey().


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