OmniSciDB
a5dc49c757
|
Classes | |
struct | AggregratedStorageStats |
class | JsonColumnSqlType |
declare this class scoped local to avoid exposing rapidjson in the header file More... | |
class | JsonColumnEncoding |
class | DdlCommandDataImpl |
Functions | |
void | vacuum_table_if_required (const Catalog_Namespace::Catalog &catalog, const TableDescriptor *td) |
void | validate_alter_type_allowed (const std::string &colname, const SQLTypeInfo &src, const SQLTypeInfo &dst) |
void | validate_alter_type_metadata (const Catalog_Namespace::Catalog &catalog, const TableDescriptor *td, const ColumnDescriptor &cd) |
std::list< std::pair< const ColumnDescriptor *, std::list < const ColumnDescriptor * > > > | get_alter_column_geo_pairs_from_src_dst_pairs_phys_cds (const AlterTableAlterColumnCommand::TypePairs &src_dst_cds, const std::list< std::list< ColumnDescriptor >> &phys_cds) |
AlterTableAlterColumnCommand::TypePairs | get_alter_column_pairs_from_src_dst_cds (std::list< ColumnDescriptor > &src_cds, std::list< ColumnDescriptor > &dst_cds) |
std::pair< std::list < ColumnDescriptor > , std::list< ColumnDescriptor > > | get_alter_column_src_dst_cds (const std::list< Parser::ColumnDef > &columns, Catalog_Namespace::Catalog &catalog, const TableDescriptor *td) |
template<class LockType > | |
std::tuple< const TableDescriptor *, std::unique_ptr < lockmgr::TableSchemaLockContainer < LockType > > > | get_table_descriptor_with_lock (Catalog_Namespace::Catalog &cat, const std::string &table_name, const bool populate_fragmenter) |
template<class Func > | |
void | exec_for_tables_which_exist (const std::vector< std::string > &table_names, Catalog_Namespace::Catalog *cat_ptr, Func func) |
AggregratedStorageStats | get_agg_storage_stats (const TableDescriptor *td, const Catalog_Namespace::Catalog *catalog) |
std::unique_ptr< RexLiteral > | genLiteralStr (std::string val) |
std::unique_ptr< RexLiteral > | genLiteralTimestamp (time_t val) |
std::unique_ptr< RexLiteral > | genLiteralBigInt (int64_t val) |
std::unique_ptr< RexLiteral > | genLiteralDouble (double val) |
std::unique_ptr< RexLiteral > | genLiteralBoolean (bool val) |
void | set_headers_with_type (std::vector< TargetMetaInfo > &label_infos, const std::vector< std::tuple< std::string, SQLTypes, bool >> &headers) |
void | add_table_details (std::vector< RelLogicalValues::RowValues > &logical_values, const TableDescriptor *logical_table, const AggregratedStorageStats &agg_storage_stats) |
const rapidjson::Value & | extractPayload (const DdlCommandData &ddl_data) |
const rapidjson::Value * | extractFilters (const rapidjson::Value &payload) |
bool | is_default_server (const std::string &server_name) |
void | throw_reserved_server_prefix_exception () |
Variables | |
const std::array< std::string, 3 > | kReservedServerPrefixes {"default", "system", "internal"} |
void anonymous_namespace{DdlCommandExecutor.cpp}::add_table_details | ( | std::vector< RelLogicalValues::RowValues > & | logical_values, |
const TableDescriptor * | logical_table, | ||
const AggregratedStorageStats & | agg_storage_stats | ||
) |
Definition at line 356 of file DdlCommandExecutor.cpp.
References File_Namespace::StorageStats::data_file_count, genLiteralBigInt(), genLiteralBoolean(), genLiteralStr(), anonymous_namespace{DdlCommandExecutor.cpp}::AggregratedStorageStats::max_epoch, anonymous_namespace{DdlCommandExecutor.cpp}::AggregratedStorageStats::max_epoch_floor, TableDescriptor::maxFragRows, TableDescriptor::maxRollbackEpochs, TableDescriptor::maxRows, File_Namespace::StorageStats::metadata_file_count, anonymous_namespace{DdlCommandExecutor.cpp}::AggregratedStorageStats::min_epoch, anonymous_namespace{DdlCommandExecutor.cpp}::AggregratedStorageStats::min_epoch_floor, TableDescriptor::nColumns, TableDescriptor::nShards, NULL_BIGINT, TableDescriptor::tableId, TableDescriptor::tableName, File_Namespace::StorageStats::total_data_file_size, File_Namespace::StorageStats::total_data_page_count, File_Namespace::StorageStats::total_free_data_page_count, File_Namespace::StorageStats::total_free_metadata_page_count, File_Namespace::StorageStats::total_metadata_file_size, and File_Namespace::StorageStats::total_metadata_page_count.
Referenced by ShowTableDetailsCommand::execute().
void anonymous_namespace{DdlCommandExecutor.cpp}::exec_for_tables_which_exist | ( | const std::vector< std::string > & | table_names, |
Catalog_Namespace::Catalog * | cat_ptr, | ||
Func | func | ||
) |
Definition at line 235 of file DdlCommandExecutor.cpp.
Referenced by ShowTableDetailsCommand::execute(), ShowDiskCacheUsageCommand::execute(), and ShowTableDetailsCommand::getFilteredTableNames().
const rapidjson::Value* anonymous_namespace{DdlCommandExecutor.cpp}::extractFilters | ( | const rapidjson::Value & | payload | ) |
Definition at line 493 of file DdlCommandExecutor.cpp.
Referenced by ShowForeignServersCommand::execute().
const rapidjson::Value& anonymous_namespace{DdlCommandExecutor.cpp}::extractPayload | ( | const DdlCommandData & | ddl_data | ) |
Definition at line 488 of file DdlCommandExecutor.cpp.
References anonymous_namespace{DdlCommandExecutor.cpp}::DdlCommandDataImpl::payload().
Referenced by AlterTableAlterColumnCommand::alterColumn(), AlterDatabaseCommand::AlterDatabaseCommand(), AlterForeignServerCommand::AlterForeignServerCommand(), AlterForeignTableCommand::AlterForeignTableCommand(), AlterForeignTableCommand::alterOptions(), AlterTableAlterColumnCommand::AlterTableAlterColumnCommand(), AlterTableCommand::AlterTableCommand(), AlterForeignServerCommand::changeForeignServerOwner(), AlterDatabaseCommand::changeOwner(), CreateForeignServerCommand::CreateForeignServerCommand(), CreateForeignTableCommand::CreateForeignTableCommand(), DropForeignServerCommand::DropForeignServerCommand(), DropForeignTableCommand::DropForeignTableCommand(), CreateForeignServerCommand::execute(), AlterForeignServerCommand::execute(), DropForeignServerCommand::execute(), CreateForeignTableCommand::execute(), DropForeignTableCommand::execute(), AlterTableCommand::execute(), AlterForeignTableCommand::execute(), ShowForeignServersCommand::execute(), ShowCreateTableCommand::execute(), ShowFunctionsCommand::execute(), ShowTableFunctionsCommand::execute(), ShowModelFeatureDetailsCommand::execute(), EvaluateModelCommand::execute(), ShowUserDetailsCommand::execute(), ShowRolesCommand::execute(), RefreshForeignTablesCommand::execute(), AlterDatabaseCommand::execute(), DdlCommandExecutor::execute(), DdlCommandExecutor::getDistributedExecutionDetails(), ShowModelDetailsCommand::getFilteredModelNames(), ShowTableDetailsCommand::getFilteredTableNames(), ShowDiskCacheUsageCommand::getFilteredTableNames(), DdlCommandExecutor::getSessionParameter(), DdlCommandExecutor::getTargetQuerySessionToKill(), AlterForeignServerCommand::hasAlterServerPrivileges(), ReassignOwnedCommand::ReassignOwnedCommand(), RefreshForeignTablesCommand::RefreshForeignTablesCommand(), AlterDatabaseCommand::rename(), AlterForeignTableCommand::renameColumn(), AlterForeignServerCommand::renameForeignServer(), AlterForeignTableCommand::renameTable(), DdlCommandExecutor::returnCacheType(), DdlCommandExecutor::returnQueueAction(), CreateForeignTableCommand::setColumnDetails(), AlterForeignServerCommand::setForeignServerDataWrapper(), AlterForeignServerCommand::setForeignServerOptions(), CreateForeignTableCommand::setTableDetails(), ShowCreateServerCommand::ShowCreateServerCommand(), ShowDiskCacheUsageCommand::ShowDiskCacheUsageCommand(), ShowForeignServersCommand::ShowForeignServersCommand(), ShowRolesCommand::ShowRolesCommand(), ShowTableDetailsCommand::ShowTableDetailsCommand(), and ShowUserDetailsCommand::ShowUserDetailsCommand().
std::unique_ptr<RexLiteral> anonymous_namespace{DdlCommandExecutor.cpp}::genLiteralBigInt | ( | int64_t | val | ) |
Definition at line 327 of file DdlCommandExecutor.cpp.
References kBIGINT.
Referenced by add_table_details(), ShowModelDetailsCommand::execute(), ShowDiskCacheUsageCommand::execute(), ShowUserDetailsCommand::execute(), and ShowModelFeatureDetailsCommand::prepareLogicalValues().
std::unique_ptr<RexLiteral> anonymous_namespace{DdlCommandExecutor.cpp}::genLiteralBoolean | ( | bool | val | ) |
Definition at line 337 of file DdlCommandExecutor.cpp.
References kBIGINT.
Referenced by add_table_details(), ShowFunctionsCommand::execute(), ShowTableFunctionsCommand::execute(), and ShowUserDetailsCommand::execute().
std::unique_ptr<RexLiteral> anonymous_namespace{DdlCommandExecutor.cpp}::genLiteralDouble | ( | double | val | ) |
Definition at line 332 of file DdlCommandExecutor.cpp.
References kDOUBLE.
Referenced by ShowModelDetailsCommand::execute(), EvaluateModelCommand::execute(), and ShowModelFeatureDetailsCommand::prepareLogicalValues().
std::unique_ptr<RexLiteral> anonymous_namespace{DdlCommandExecutor.cpp}::genLiteralStr | ( | std::string | val | ) |
std::unique_ptr<RexLiteral> anonymous_namespace{DdlCommandExecutor.cpp}::genLiteralTimestamp | ( | time_t | val | ) |
Definition at line 322 of file DdlCommandExecutor.cpp.
References kTIMESTAMP.
Referenced by ShowForeignServersCommand::execute().
AggregratedStorageStats anonymous_namespace{DdlCommandExecutor.cpp}::get_agg_storage_stats | ( | const TableDescriptor * | td, |
const Catalog_Namespace::Catalog * | catalog | ||
) |
Definition at line 292 of file DdlCommandExecutor.cpp.
References CHECK, CHECK_EQ, Catalog_Namespace::Catalog::getDatabaseId(), Catalog_Namespace::Catalog::getDataMgr(), Data_Namespace::DataMgr::getGlobalFileMgr(), Catalog_Namespace::Catalog::getPhysicalTablesDescriptors(), TableDescriptor::nShards, and TableDescriptor::tableId.
Referenced by ShowTableDetailsCommand::execute().
std::list<std::pair<const ColumnDescriptor*, std::list<const ColumnDescriptor*> > > anonymous_namespace{DdlCommandExecutor.cpp}::get_alter_column_geo_pairs_from_src_dst_pairs_phys_cds | ( | const AlterTableAlterColumnCommand::TypePairs & | src_dst_cds, |
const std::list< std::list< ColumnDescriptor >> & | phys_cds | ||
) |
Definition at line 101 of file DdlCommandExecutor.cpp.
References CHECK.
Referenced by AlterTableAlterColumnCommand::alterColumnTypes().
AlterTableAlterColumnCommand::TypePairs anonymous_namespace{DdlCommandExecutor.cpp}::get_alter_column_pairs_from_src_dst_cds | ( | std::list< ColumnDescriptor > & | src_cds, |
std::list< ColumnDescriptor > & | dst_cds | ||
) |
Definition at line 130 of file DdlCommandExecutor.cpp.
References CHECK_EQ.
Referenced by AlterTableAlterColumnCommand::alterColumn().
std::pair<std::list<ColumnDescriptor>, std::list<ColumnDescriptor> > anonymous_namespace{DdlCommandExecutor.cpp}::get_alter_column_src_dst_cds | ( | const std::list< Parser::ColumnDef > & | columns, |
Catalog_Namespace::Catalog & | catalog, | ||
const TableDescriptor * | td | ||
) |
Definition at line 144 of file DdlCommandExecutor.cpp.
References CHECK, ColumnDescriptor::chunks, ColumnDescriptor::columnId, ColumnDescriptor::columnName, ColumnDescriptor::columnType, ddl_utils::alter_column_utils::compare_column_descriptors(), ColumnDescriptor::db_id, ddl_utils::alter_column_utils::CompareResult::exact_match, SQLTypeInfo::get_comp_param(), Catalog_Namespace::Catalog::getMetadataForColumn(), SQLTypeInfo::is_dict_encoded_string(), SQLTypeInfo::is_dict_encoded_type(), Parser::set_column_descriptor(), SQLTypeInfo::set_comp_param(), SQLTypeInfo::set_size(), SQLTypeInfo::setStringDictKey(), ColumnDescriptor::sourceName, ddl_utils::alter_column_utils::CompareResult::sql_types_match, ColumnDescriptor::tableId, TableDescriptor::tableId, UNREACHABLE, validate_alter_type_allowed(), and validate_alter_type_metadata().
Referenced by AlterTableAlterColumnCommand::alterColumn().
std::tuple<const TableDescriptor*, std::unique_ptr<lockmgr::TableSchemaLockContainer<LockType> > > anonymous_namespace{DdlCommandExecutor.cpp}::get_table_descriptor_with_lock | ( | Catalog_Namespace::Catalog & | cat, |
const std::string & | table_name, | ||
const bool | populate_fragmenter | ||
) |
Definition at line 216 of file DdlCommandExecutor.cpp.
References CHECK.
bool anonymous_namespace{DdlCommandExecutor.cpp}::is_default_server | ( | const std::string & | server_name | ) |
Definition at line 845 of file DdlCommandExecutor.cpp.
References anonymous_namespace{QueryMemoryDescriptor.cpp}::any_of(), and kReservedServerPrefixes.
Referenced by CreateForeignServerCommand::execute(), AlterForeignServerCommand::execute(), DropForeignServerCommand::execute(), AlterForeignServerCommand::renameForeignServer(), and CreateForeignTableCommand::setTableDetails().
void anonymous_namespace{DdlCommandExecutor.cpp}::set_headers_with_type | ( | std::vector< TargetMetaInfo > & | label_infos, |
const std::vector< std::tuple< std::string, SQLTypes, bool >> & | headers | ||
) |
Definition at line 342 of file DdlCommandExecutor.cpp.
References report::header, kBIGINT, kBOOLEAN, kTEXT, kTIMESTAMP, to_string(), and UNREACHABLE.
Referenced by ShowTableDetailsCommand::execute().
void anonymous_namespace{DdlCommandExecutor.cpp}::throw_reserved_server_prefix_exception | ( | ) |
Definition at line 853 of file DdlCommandExecutor.cpp.
References kReservedServerPrefixes.
Referenced by CreateForeignServerCommand::execute(), and AlterForeignServerCommand::renameForeignServer().
void anonymous_namespace{DdlCommandExecutor.cpp}::vacuum_table_if_required | ( | const Catalog_Namespace::Catalog & | catalog, |
const TableDescriptor * | td | ||
) |
Definition at line 51 of file DdlCommandExecutor.cpp.
References DEBUG_TIMER, measure< TimeT >::execution(), Executor::getExecutor(), Catalog_Namespace::Catalog::getMetadataForTable(), TableDescriptor::hasDeletedCol, logger::INFO, LOG, TableDescriptor::tableName, Executor::UNITARY_EXECUTOR_ID, and TableOptimizer::vacuumDeletedRows().
Referenced by AlterTableAlterColumnCommand::alterColumnTypes().
void anonymous_namespace{DdlCommandExecutor.cpp}::validate_alter_type_allowed | ( | const std::string & | colname, |
const SQLTypeInfo & | src, | ||
const SQLTypeInfo & | dst | ||
) |
Definition at line 68 of file DdlCommandExecutor.cpp.
References SQLTypeInfo::is_string().
Referenced by get_alter_column_src_dst_cds().
void anonymous_namespace{DdlCommandExecutor.cpp}::validate_alter_type_metadata | ( | const Catalog_Namespace::Catalog & | catalog, |
const TableDescriptor * | td, | ||
const ColumnDescriptor & | cd | ||
) |
Definition at line 77 of file DdlCommandExecutor.cpp.
References ColumnDescriptor::columnId, ColumnDescriptor::columnName, ColumnDescriptor::columnType, SQLTypeInfo::get_notnull(), Data_Namespace::DataMgr::getChunkMetadataVecForKeyPrefix(), Catalog_Namespace::Catalog::getDatabaseId(), Catalog_Namespace::Catalog::getDataMgr(), TableDescriptor::nShards, and TableDescriptor::tableId.
Referenced by get_alter_column_src_dst_cds().
const std::array<std::string, 3> anonymous_namespace{DdlCommandExecutor.cpp}::kReservedServerPrefixes {"default", "system", "internal"} |
Definition at line 843 of file DdlCommandExecutor.cpp.
Referenced by is_default_server(), and throw_reserved_server_prefix_exception().