OmniSciDB  a5dc49c757
 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 TableArchiver::dumpTable(), anonymous_namespace{DBHandler.cpp}::get_refresh_info(), foreign_storage::anonymous_namespace{InternalCatalogDataWrapper.cpp}::get_table_type(), ShowTableDetailsCommand::getFilteredTableNames(), 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(), ShowTableDetailsCommand::getFilteredTableNames(), 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::addColumnNontransactional(), Catalog_Namespace::Catalog::addTableToMap(), AlterTableAlterColumnCommand::alterColumnTypes(), Catalog_Namespace::Catalog::alterPhysicalTableMetadata(), Catalog_Namespace::Catalog::alterTableMetadata(), Parser::InsertStmt::analyze(), RelModify::applyUpdateModificationsToInputNode(), Catalog_Namespace::Catalog::buildTablesMapUnlocked(), anonymous_namespace{DBHandler.cpp}::check_and_reset_in_memory_system_table(), Parser::AddColumnStmt::check_executable(), anonymous_namespace{Calcite.cpp}::checkPermissionForTables(), AlterTableAlterColumnCommandRecoveryMgr::checkpoint(), AlterTableAlterColumnCommandRecoveryMgr::cleanup(), AlterTableAlterColumnCommandRecoveryMgr::cleanupClearRemainingChunks(), AlterTableAlterColumnCommandRecoveryMgr::cleanupDropSourceGeoColumns(), AlterTableAlterColumnCommand::cleanupRecoveryInfo(), Executor::clearExternalCaches(), AlterTableAlterColumnCommand::clearInMemoryData(), AlterTableAlterColumnCommand::collectExpectedCatalogChanges(), UpdelRoll::commitUpdate(), compare_td_id(), anonymous_namespace{ForeignDataImporter.cpp}::create_fragment_buffers(), 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::dropColumnNontransactional(), Catalog_Namespace::Catalog::dropTable(), Catalog_Namespace::Catalog::dumpCreateTableUnlocked(), Catalog_Namespace::Catalog::dumpSchema(), TableArchiver::dumpTable(), Catalog_Namespace::Catalog::eraseTableMetadata(), Catalog_Namespace::Catalog::eraseTablePhysicalData(), 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(), anonymous_namespace{DdlCommandExecutor.cpp}::get_alter_column_src_dst_cds(), Fragmenter_Namespace::get_chunks(), Analyzer::RangeTableEntry::get_column_desc(), 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::getNextAddedColumnId(), Catalog_Namespace::Catalog::getPhysicalTablesDescriptors(), Catalog_Namespace::Catalog::getShardColumnMetadataForTable(), getTableChunkKey(), Parser::getTableChunkKey(), Catalog_Namespace::Catalog::getTableDictDirectories(), hash_value(), 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(), AlterTableAlterColumnCommand::populateAndWriteRecoveryInfo(), foreign_storage::ParquetDataWrapper::populateChunkBuffers(), 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(), Catalog_Namespace::Catalog::refreshDictionaryCachesForTableUnlocked(), foreign_storage::LogFileBufferParser::regexMatchColumns(), ForeignStorageInterface::registerTable(), Catalog_Namespace::Catalog::reloadForeignTableUnlocked(), AlterForeignTableCommand::renameColumn(), Catalog_Namespace::Catalog::renameColumn(), Catalog_Namespace::Catalog::renamePhysicalTable(), Catalog_Namespace::Catalog::renameTable(), Catalog_Namespace::Catalog::renameTables(), TableArchiver::restoreTable(), AlterTableAlterColumnCommandRecoveryMgr::rollback(), Catalog_Namespace::Catalog::serializeTableJsonUnlocked(), Catalog_Namespace::Catalog::setForeignTableProperty(), foreign_storage::ParquetDataWrapper::updateChunkMetadataForFragment(), Fragmenter_Namespace::InsertOrderFragmenter::updateColumn(), Fragmenter_Namespace::InsertOrderFragmenter::updateColumns(), foreign_storage::AbstractTextFileDataWrapper::updateMetadata(), Catalog_Namespace::Catalog::updateViewUnlocked(), TableOptimizer::vacuumDeletedRows(), TableOptimizer::vacuumFragments(), TableOptimizer::vacuumFragmentsAboveMinSelectivity(), anonymous_namespace{DdlCommandExecutor.cpp}::validate_alter_type_metadata(), 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::addColumnNontransactional(), Catalog_Namespace::Catalog::addTableToMap(), Catalog_Namespace::Catalog::alterTableMetadata(), foreign_storage::LazyParquetChunkLoader::appendRowGroups(), Catalog_Namespace::Catalog::buildTablesMapUnlocked(), Parser::check_alter_table_privilege(), anonymous_namespace{DBHandler.cpp}::check_and_reset_in_memory_system_table(), 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::dropColumnNontransactional(), 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(), Catalog_Namespace::Catalog::getSystemTableSchema(), hash_value(), DBHandler::hasTableAccessPrivileges(), EmbeddedDatabase::DBEngineImpl::importArrowTable(), import_export::ForeignDataImporter::importGeneral(), foreign_storage::InternalCatalogDataWrapper::initializeObjectsForTable(), foreign_storage::InternalMemoryStatsDataWrapper::initializeObjectsForTable(), foreign_storage::InternalMLModelMetadataDataWrapper::initializeObjectsForTable(), foreign_storage::InternalExecutorStatsDataWrapper::initializeObjectsForTable(), Catalog_Namespace::Catalog::instantiateFragmenter(), import_export::Loader::loadToShard(), foreign_storage::InternalSystemDataWrapper::populateChunkBuffers(), foreign_storage::InternalCatalogDataWrapper::populateChunkBuffersForTable(), foreign_storage::InternalMemoryStatsDataWrapper::populateChunkBuffersForTable(), foreign_storage::InternalMLModelMetadataDataWrapper::populateChunkBuffersForTable(), foreign_storage::InternalExecutorStatsDataWrapper::populateChunkBuffersForTable(), foreign_storage::InternalSystemDataWrapper::populateChunkMetadata(), TableOptimizer::recomputeMetadata(), Catalog_Namespace::Catalog::recreateSystemTableIfUpdated(), foreign_storage::refresh_foreign_table_unlocked(), foreign_storage::LogFileBufferParser::regexMatchColumns(), Catalog_Namespace::Catalog::reloadForeignTableUnlocked(), Catalog_Namespace::Catalog::reloadTableMetadataUnlocked(), Catalog_Namespace::Catalog::renameColumn(), Catalog_Namespace::Catalog::renamePhysicalTable(), Catalog_Namespace::Catalog::renamePhysicalTables(), Catalog_Namespace::Catalog::renameTables(), 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::toString(), RelModify::toString(), Catalog_Namespace::Catalog::updateViewUnlocked(), DBHandler::user_can_access_table(), Parser::anonymous_namespace{ParserNode.cpp}::user_can_access_table(), anonymous_namespace{DdlCommandExecutor.cpp}::vacuum_table_if_required(), ddl_utils::validate_table_type(), and foreign_storage::AbstractFileStorageDataWrapper::validateFilePathOptionKey().


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