OmniSciDB  c1a53651b2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Catalog.h
Go to the documentation of this file.
1 /*
2  * Copyright 2022 HEAVY.AI, Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
28 #pragma once
29 
30 #include <array>
31 #include <atomic>
32 #include <cstdint>
33 #include <ctime>
34 #include <limits>
35 #include <list>
36 #include <map>
37 #include <mutex>
38 #include <string>
39 #include <utility>
40 #include <vector>
41 
42 #include "Calcite/Calcite.h"
46 #include "Catalog/DictDescriptor.h"
47 #include "Catalog/ForeignServer.h"
48 #include "Catalog/ForeignTable.h"
49 #include "Catalog/LinkDescriptor.h"
50 #include "Catalog/SessionInfo.h"
51 #include "Catalog/SysCatalog.h"
53 #include "Catalog/TableMetadata.h"
54 #include "Catalog/Types.h"
55 #include "DataMgr/DataMgr.h"
60 
61 #include "LeafHostInfo.h"
62 
64 
65 namespace lockmgr {
66 
67 template <class T>
69 
70 } // namespace lockmgr
71 
72 namespace Parser {
73 
75 
76 } // namespace Parser
77 
78 class TableArchiver;
79 
80 // SPI means Sequential Positional Index which is equivalent to the input index in a
81 // RexInput node
82 #define SPIMAP_MAGIC1 (std::numeric_limits<unsigned>::max() / 4)
83 #define SPIMAP_MAGIC2 8
84 #define SPIMAP_GEO_PHYSICAL_INPUT(c, i) \
85  (SPIMAP_MAGIC1 + (unsigned)(SPIMAP_MAGIC2 * ((c) + 1) + (i)))
86 
87 namespace File_Namespace {
88 struct FileMgrParams;
89 }
90 namespace Catalog_Namespace {
93 
94  TableEpochInfo(const int32_t table_id_param, const int32_t table_epoch_param)
95  : table_id(table_id_param), table_epoch(table_epoch_param) {}
96  TableEpochInfo(const int32_t table_id_param,
97  const int32_t table_epoch_param,
98  const size_t leaf_index_param)
99  : table_id(table_id_param)
100  , table_epoch(table_epoch_param)
101  , leaf_index(leaf_index_param) {}
102 };
103 
104 static constexpr const char* USERS_SYS_TABLE_NAME{"users"};
105 static constexpr const char* TABLES_SYS_TABLE_NAME{"tables"};
106 static constexpr const char* DASHBOARDS_SYS_TABLE_NAME{"dashboards"};
107 static constexpr const char* DATABASES_SYS_TABLE_NAME{"databases"};
108 static constexpr const char* PERMISSIONS_SYS_TABLE_NAME{"permissions"};
109 static constexpr const char* ROLES_SYS_TABLE_NAME{"roles"};
110 static constexpr const char* ROLE_ASSIGNMENTS_SYS_TABLE_NAME{"role_assignments"};
111 static constexpr const char* MEMORY_SUMMARY_SYS_TABLE_NAME{"memory_summary"};
112 static constexpr const char* MEMORY_DETAILS_SYS_TABLE_NAME{"memory_details"};
113 static constexpr const char* STORAGE_DETAILS_SYS_TABLE_NAME{"storage_details"};
114 static constexpr const char* SERVER_LOGS_SYS_TABLE_NAME{"server_logs"};
115 static constexpr const char* REQUEST_LOGS_SYS_TABLE_NAME{"request_logs"};
116 static constexpr const char* WS_SERVER_LOGS_SYS_TABLE_NAME{"web_server_logs"};
117 static constexpr const char* WS_SERVER_ACCESS_LOGS_SYS_TABLE_NAME{
118  "web_server_access_logs"};
119 
120 static const std::array<std::string, 4> kAggregatorOnlySystemTables{
125 
132 class Catalog final {
133  public:
142  Catalog(const std::string& basePath,
143  const DBMetadata& curDB,
144  std::shared_ptr<Data_Namespace::DataMgr> dataMgr,
145  const std::vector<LeafHostInfo>& string_dict_hosts,
146  std::shared_ptr<Calcite> calcite,
147  bool is_new_db);
148 
153  Catalog();
154 
161  ~Catalog();
162 
163  static void expandGeoColumn(const ColumnDescriptor& cd,
164  std::list<ColumnDescriptor>& columns);
165  void createTable(TableDescriptor& td,
166  const std::list<ColumnDescriptor>& columns,
167  const std::vector<Parser::SharedDictionaryDef>& shared_dict_defs,
168  bool isLogicalTable);
169  void createShardedTable(
170  TableDescriptor& td,
171  const std::list<ColumnDescriptor>& columns,
172  const std::vector<Parser::SharedDictionaryDef>& shared_dict_defs);
175  std::string createLink(LinkDescriptor& ld, size_t min_length);
176  void dropTable(const TableDescriptor* td);
177  void truncateTable(const TableDescriptor* td);
178  void renameTable(const TableDescriptor* td, const std::string& newTableName);
179  void renameTable(std::vector<std::pair<std::string, std::string>>& names);
180  void renameColumn(const TableDescriptor* td,
181  const ColumnDescriptor* cd,
182  const std::string& newColumnName);
183  void addColumn(const TableDescriptor& td, ColumnDescriptor& cd);
184  void dropColumn(const TableDescriptor& td, const ColumnDescriptor& cd);
185  void invalidateCachesForTable(const int table_id);
186  void removeFragmenterForTable(const int table_id) const;
187 
188  const std::map<int, const ColumnDescriptor*> getDictionaryToColumnMapping();
189 
198  const TableDescriptor* getMetadataForTable(const std::string& tableName,
199  const bool populateFragmenter = true) const;
200  const TableDescriptor* getMetadataForTable(int tableId,
201  bool populateFragmenter = true) const;
202 
203  std::optional<std::string> getTableName(int32_t table_id) const;
204  std::optional<int32_t> getTableId(const std::string& table_name) const;
205 
206  const ColumnDescriptor* getMetadataForColumn(int tableId,
207  const std::string& colName) const;
208  const ColumnDescriptor* getMetadataForColumn(int tableId, int columnId) const;
209  const std::optional<std::string> getColumnName(int table_id, int column_id) const;
210 
211  const int getColumnIdBySpi(const int tableId, const size_t spi) const;
212  const ColumnDescriptor* getMetadataForColumnBySpi(const int tableId,
213  const size_t spi) const;
214 
215  const DashboardDescriptor* getMetadataForDashboard(const std::string& userId,
216  const std::string& dashName) const;
217 
218  const DashboardDescriptor* getMetadataForDashboard(const int32_t dashboard_id) const;
219  void deleteMetadataForDashboards(const std::vector<int32_t> ids,
220  const UserMetadata& user);
221 
222  const LinkDescriptor* getMetadataForLink(const std::string& link) const;
223  const LinkDescriptor* getMetadataForLink(int linkId) const;
224 
226  const std::string& tableName) const;
227 
228  const foreign_storage::ForeignTable* getForeignTable(int table_id) const;
229 
238  std::list<const ColumnDescriptor*> getAllColumnMetadataForTable(
239  const int tableId,
240  const bool fetchSystemColumns,
241  const bool fetchVirtualColumns,
242  const bool fetchPhysicalColumns) const;
243 
244  std::list<const TableDescriptor*> getAllTableMetadata() const;
245  std::vector<TableDescriptor> getAllTableMetadataCopy() const;
246  std::list<const DashboardDescriptor*> getAllDashboardsMetadata() const;
247  std::vector<DashboardDescriptor> getAllDashboardsMetadataCopy() const;
248  const DBMetadata& getCurrentDB() const { return currentDB_; }
250  std::shared_ptr<Calcite> getCalciteMgr() const { return calciteMgr_; }
251  const std::string& getCatalogBasePath() const { return basePath_; }
252 
253  const DictDescriptor* getMetadataForDict(int dict_ref, bool loadDict = true) const;
254 
255  const std::vector<LeafHostInfo>& getStringDictionaryHosts() const;
256 
258 
259  std::vector<const TableDescriptor*> getPhysicalTablesDescriptors(
260  const TableDescriptor* logical_table_desc,
261  bool populate_fragmenter = true) const;
262 
263  std::vector<std::pair<int32_t, int32_t>> getAllPersistedTableAndShardIds() const;
264 
273  std::vector<std::string> getTableNamesForUser(
274  const UserMetadata& user,
275  const GetTablesType get_tables_type) const;
276 
286  std::vector<TableMetadata> getTablesMetadataForUser(
287  const UserMetadata& user_metadata,
288  const GetTablesType get_tables_type,
289  const std::string& filter_table_name) const;
290 
291  int32_t getTableEpoch(const int32_t db_id, const int32_t table_id) const;
292  void setTableEpoch(const int db_id, const int table_id, const int new_epoch);
293  void setMaxRollbackEpochs(const int32_t table_id, const int32_t max_rollback_epochs);
294  void setMaxRows(const int32_t table_id, const int64_t max_rows);
295 
296  std::vector<TableEpochInfo> getTableEpochs(const int32_t db_id,
297  const int32_t table_id) const;
298  void setTableEpochs(const int32_t db_id,
299  const std::vector<TableEpochInfo>& table_epochs) const;
300 
301  void setTableEpochsLogExceptions(const int32_t db_id,
302  const std::vector<TableEpochInfo>& table_epochs) const;
303 
304  int getDatabaseId() const { return currentDB_.dbId; }
306  void roll(const bool forward);
308  void delDictionary(const ColumnDescriptor& cd);
309  void getDictionary(const ColumnDescriptor& cd,
310  std::map<int, StringDictionary*>& stringDicts);
311 
312  const bool checkMetadataForDeletedRecs(const TableDescriptor* td, int column_id) const;
313  const ColumnDescriptor* getDeletedColumn(const TableDescriptor* td) const;
315 
316  void setDeletedColumn(const TableDescriptor* td, const ColumnDescriptor* cd);
317  int getLogicalTableId(const int physicalTableId) const;
318  void checkpoint(const int logicalTableId) const;
319  void checkpointWithAutoRollback(const int logical_table_id) const;
320  void resetTableEpochFloor(const int logicalTableId) const;
321  std::string name() const { return getCurrentDB().dbName; }
322  void eraseDbMetadata();
323  void eraseDbPhysicalData();
324  void eraseTablePhysicalData(const TableDescriptor* td);
325  void setForReload(const int32_t tableId);
326 
327  std::vector<std::string> getTableDataDirectories(const TableDescriptor* td) const;
328  std::vector<std::string> getTableDictDirectories(const TableDescriptor* td) const;
329  std::set<std::string> getTableDictDirectoryPaths(int32_t table_id) const;
330  std::string getColumnDictDirectory(const ColumnDescriptor* cd,
331  bool file_name_only = true) const;
332  std::string dumpSchema(const TableDescriptor* td) const;
333  std::string dumpCreateTable(const TableDescriptor* td,
334  bool multiline_formatting = true,
335  bool dump_defaults = false) const;
336  std::optional<std::string> dumpCreateTable(int32_t table_id,
337  bool multiline_formatting = true,
338  bool dump_defaults = false) const;
339  std::string dumpCreateServer(const std::string& name,
340  bool multiline_formatting = true) const;
341 
349  static const std::string getForeignTableSchema(bool if_not_exists = false);
350 
358  static const std::string getForeignServerSchema(bool if_not_exists = false);
359 
369  void createForeignServer(std::unique_ptr<foreign_storage::ForeignServer> foreign_server,
370  bool if_not_exists);
371 
380  const std::string& server_name) const;
381 
391  const std::unique_ptr<const foreign_storage::ForeignServer> getForeignServerFromStorage(
392  const std::string& server_name);
393 
403  const std::unique_ptr<const foreign_storage::ForeignTable> getForeignTableFromStorage(
404  int table_id);
405 
412  void changeForeignServerOwner(const std::string& server_name, const int new_owner_id);
413 
420  void setForeignServerDataWrapper(const std::string& server_name,
421  const std::string& data_wrapper);
428  void setForeignServerOptions(const std::string& server_name,
429  const std::string& options);
436  void renameForeignServer(const std::string& server_name, const std::string& name);
437 
443  void dropForeignServer(const std::string& server_name);
444 
452  std::vector<const foreign_storage::ForeignTable*> getAllForeignTablesForForeignServer(
453  const int32_t foreign_server_id);
454 
468  const rapidjson::Value* filters,
469  const UserMetadata& user,
470  std::vector<const foreign_storage::ForeignServer*>& results);
471 
476 
487  bool validateNonExistentTableOrView(const std::string& name, const bool if_not_exists);
488 
496  std::vector<const TableDescriptor*> getAllForeignTablesForRefresh() const;
497 
504  void updateForeignTableRefreshTimes(const int32_t table_id);
505 
512  void setForeignTableOptions(const std::string& table_name,
513  foreign_storage::OptionsMap& options_map,
514  bool clear_existing_options = true);
515 
516  void updateLeaf(const LeafHostInfo& string_dict_host);
517 
518  // For testing purposes only
519  void setUncappedTableEpoch(const std::string& table_name);
520 
521  // Methods for accessing and updating custom expressions
522 
530  static const std::string getCustomExpressionsSchema(bool if_not_exists = false);
531 
539  int32_t createCustomExpression(std::unique_ptr<CustomExpression> custom_expression);
540 
548  const CustomExpression* getCustomExpression(int32_t custom_expression_id) const;
549 
559  const std::unique_ptr<const CustomExpression> getCustomExpressionFromStorage(
560  int32_t custom_expression_id);
561 
570  std::vector<const CustomExpression*> getCustomExpressionsForUser(
571  const UserMetadata& user) const;
572 
579  void updateCustomExpression(int32_t custom_expression_id,
580  const std::string& expression_json);
581 
588  void deleteCustomExpressions(const std::vector<int32_t>& custom_expression_ids,
589  bool do_soft_delete);
590 
599  void reassignOwners(const std::set<std::string>& old_owners,
600  const std::string& new_owner);
601 
602  bool isInfoSchemaDb() const;
603 
604  protected:
607  void updateDictionaryNames();
610  void updateGeoColumns();
612  void updateLinkSchema();
615  void updateLogicalToPhysicalTableMap(const int32_t logical_tb_id);
616  void updateDictionarySchema();
617  void updatePageSize();
622  void updateFsiSchemas();
627  void buildMaps();
628  void addTableToMap(const TableDescriptor* td,
629  const std::list<ColumnDescriptor>& columns,
630  const std::list<DictDescriptor>& dicts);
631  void addReferenceToForeignDict(ColumnDescriptor& referencing_column,
632  Parser::SharedDictionaryDef shared_dict_def,
633  const bool persist_reference);
635  ColumnDescriptor& cd,
636  std::list<ColumnDescriptor>& cdd,
637  std::list<DictDescriptor>& dds,
638  const TableDescriptor td,
639  const std::vector<Parser::SharedDictionaryDef>& shared_dict_defs);
641  std::list<DictDescriptor>& dds,
642  const TableDescriptor& td,
643  bool is_logical_table,
644  bool use_temp_dictionary = false);
647  void addLinkToMap(LinkDescriptor& ld);
648  void removeTableFromMap(const std::string& tableName,
649  const int tableId,
650  const bool is_on_error = false);
651  void eraseTableMetadata(const TableDescriptor* td);
653  void doTruncateTable(const TableDescriptor* td);
654  void renamePhysicalTable(const TableDescriptor* td, const std::string& newTableName);
655  void renamePhysicalTable(std::vector<std::pair<std::string, std::string>>& names,
656  std::vector<int>& tableIds);
657  void instantiateFragmenter(TableDescriptor* td) const;
659  std::list<const ColumnDescriptor*>& colDescs,
660  const bool fetchSystemColumns,
661  const bool fetchVirtualColumns,
662  const bool fetchPhysicalColumns) const;
663  std::string calculateSHA1(const std::string& data);
664  std::string generatePhysicalTableName(const std::string& logicalTableName,
665  const int32_t& shardNumber);
666  std::vector<DBObject> parseDashboardObjects(const std::string& view_meta,
667  const int& user_id);
668  void createOrUpdateDashboardSystemRole(const std::string& view_meta,
669  const int32_t& user_id,
670  const std::string& dash_role_name);
671 
672  const int getColumnIdBySpiUnlocked(const int table_id, const size_t spi) const;
673 
675  const std::list<ColumnDescriptor>& cds) const;
676  void dropTableFromJsonUnlocked(const std::string& table_name) const;
677 
678  std::string basePath_;
691 
694  std::shared_ptr<Data_Namespace::DataMgr> dataMgr_;
695 
696  const std::vector<LeafHostInfo> string_dict_hosts_;
697  std::shared_ptr<Calcite> calciteMgr_;
698 
700  static const std::string
701  physicalTableNameTag_; // extra component added to the name of each physical table
704 
705  // this tuple is for rolling forw/back once after ALTER ADD/DEL/MODIFY columns
706  // succeeds/fails
707  // get(0) = old ColumnDescriptor*
708  // get(1) = new ColumnDescriptor*
710  std::vector<std::pair<ColumnDescriptor*, ColumnDescriptor*>>;
712 
713  private:
715  void reloadTableMetadata(int table_id);
716  template <class T>
717  friend class lockmgr::TableLockMgrImpl; // for reloadTableMetadataUnlocked()
718  void reloadTableMetadataUnlocked(int table_id);
719  void reloadCatalogMetadata(const std::map<int32_t, std::string>& user_name_by_user_id);
721  const std::map<int32_t, std::string>& user_name_by_user_id);
723  void buildTablesMapUnlocked();
728  const std::map<int32_t, std::string>& user_name_by_user_id);
729  void buildLinksMapUnlocked();
732 
733  void gatherAdditionalInfo(std::vector<std::string>& additional_info,
734  std::set<std::string>& shared_dict_column_names,
735  const TableDescriptor* td) const;
736  std::string quoteIfRequired(const std::string& column_name) const;
739  const std::string& temp_data_dir,
740  const std::unordered_map<int, int>& all_column_ids_map) const;
741  void renameTableDirectories(const std::string& temp_data_dir,
742  const std::vector<std::string>& target_paths,
743  const std::string& name_prefix) const;
745 
746  void setForeignServerProperty(const std::string& server_name,
747  const std::string& property,
748  const std::string& value);
749 
751  const std::string& property,
752  const std::string& value);
753 
755  const TableDescriptorUpdateParams& table_update_params);
756  void alterTableMetadata(const TableDescriptor* td,
757  const TableDescriptorUpdateParams& table_update_params);
758  void setTableFileMgrParams(const int table_id,
759  const File_Namespace::FileMgrParams& file_mgr_params);
761  const UserMetadata& user_metadata,
762  const GetTablesType get_tables_type) const;
763 
766  const std::string& table_name) const;
767 
773  std::unique_ptr<foreign_storage::ForeignServer> foreign_server,
774  bool if_not_exists);
775 
777  const std::string& tableName) const;
778 
779  const Catalog* getObjForLock();
780  void removeChunks(const int table_id) const;
781 
783  std::unique_ptr<CustomExpression> getCustomExpressionFromConnector(size_t row);
784 
785  void restoreOldOwners(
786  const std::map<int32_t, std::string>& old_owners_user_name_by_id,
787  const std::map<int32_t, std::vector<DBObject>>& old_owner_db_objects,
788  int32_t new_owner_id);
790  const std::map<int32_t, std::string>& old_owners_user_name_by_id,
791  const std::map<int32_t, std::vector<DBObject>>& old_owner_db_objects,
792  int32_t new_owner_id);
793 
796  void initializeSystemTables();
811 
812  void createSystemTableServer(const std::string& server_name,
813  const std::string& data_wrapper_type,
814  const foreign_storage::OptionsMap& options = {});
815  std::pair<foreign_storage::ForeignTable, std::list<ColumnDescriptor>>
817  const std::string& table_name,
818  const std::string& server_name,
819  const std::vector<std::pair<std::string, SQLTypeInfo>>& column_type_by_name,
820  bool is_in_memory_system_table);
821 
823  const std::list<ColumnDescriptor>& columns);
824 
825  void setDeletedColumnUnlocked(const TableDescriptor* td, const ColumnDescriptor* cd);
826 
829 
831  const TableDescriptor* logical_table,
832  const std::vector<const TableDescriptor*>& physical_tables);
833 
834  std::string dumpCreateTableUnlocked(const TableDescriptor* td,
835  bool multiline_formatting,
836  bool dump_defaults) const;
837 
838  static constexpr const char* CATALOG_SERVER_NAME{"system_catalog_server"};
839  static constexpr const char* MEMORY_STATS_SERVER_NAME{"system_memory_stats_server"};
840  static constexpr const char* STORAGE_STATS_SERVER_NAME{"system_storage_stats_server"};
841  static constexpr const char* LOGS_SERVER_NAME{"system_logs_server"};
842  static constexpr std::array<const char*, 4> INTERNAL_SERVERS{CATALOG_SERVER_NAME,
846 
847  public:
848  mutable std::unique_ptr<heavyai::DistributedSharedMutex> dcatalogMutex_;
849  mutable std::unique_ptr<heavyai::DistributedSharedMutex> dsqliteMutex_;
850  mutable std::mutex sqliteMutex_;
852  mutable std::atomic<std::thread::id> thread_holding_sqlite_lock;
853  mutable std::atomic<std::thread::id> thread_holding_write_lock;
854  // assuming that you never call into a catalog from another catalog via the same thread
855  static thread_local bool thread_holds_read_lock;
856  bool initialized_ = false;
857 };
858 
859 } // namespace Catalog_Namespace
std::string dumpCreateTable(const TableDescriptor *td, bool multiline_formatting=true, bool dump_defaults=false) const
Definition: Catalog.cpp:5230
static constexpr const char * MEMORY_DETAILS_SYS_TABLE_NAME
Definition: Catalog.h:112
void serializeTableJsonUnlocked(const TableDescriptor *td, const std::list< ColumnDescriptor > &cds) const
Definition: Catalog.cpp:2988
std::unordered_map< const TableDescriptor *, const ColumnDescriptor * > DeletedColumnPerTableMap
Definition: Types.h:48
void updateViewUnlocked(TableDescriptor &)
Definition: Catalog.cpp:1490
void instantiateFragmenter(TableDescriptor *td) const
Definition: Catalog.cpp:1873
void removeFromColumnMap(ColumnDescriptor *cd)
Definition: Catalog.cpp:6569
const foreign_storage::ForeignTable * getForeignTable(const std::string &tableName) const
Definition: Catalog.cpp:1922
static constexpr const char * WS_SERVER_ACCESS_LOGS_SYS_TABLE_NAME
Definition: Catalog.h:117
void initializePermissionsSystemTable()
Definition: Catalog.cpp:6188
void deleteMetadataForDashboards(const std::vector< int32_t > ids, const UserMetadata &user)
Definition: Catalog.cpp:2106
TableDictColumnsMap dict_columns_by_table_id_
Definition: Catalog.h:690
void executeDropTableSqliteQueries(const TableDescriptor *td)
Definition: Catalog.cpp:4148
void renameTableDirectories(const std::string &temp_data_dir, const std::vector< std::string > &target_paths, const std::string &name_prefix) const
std::pair< foreign_storage::ForeignTable, std::list< ColumnDescriptor > > getSystemTableSchema(const std::string &table_name, const std::string &server_name, const std::vector< std::pair< std::string, SQLTypeInfo >> &column_type_by_name, bool is_in_memory_system_table)
Definition: Catalog.cpp:6469
static constexpr const char * SERVER_LOGS_SYS_TABLE_NAME
Definition: Catalog.h:114
void eraseTablePhysicalData(const TableDescriptor *td)
Definition: Catalog.cpp:4898
void conditionallyInitializeSystemObjects()
Definition: Catalog.cpp:6045
~Catalog()
Destructor - deletes all ColumnDescriptor and TableDescriptor structures which were allocated on the ...
Definition: Catalog.cpp:231
std::string getColumnDictDirectory(const ColumnDescriptor *cd, bool file_name_only=true) const
Definition: Catalog.cpp:5051
void getDictionary(const ColumnDescriptor &cd, std::map< int, StringDictionary * > &stringDicts)
Definition: Catalog.cpp:2390
heavyai::shared_mutex sharedMutex_
Definition: Catalog.h:851
class for a per-database catalog. also includes metadata for the current database and the current use...
Definition: Catalog.h:132
std::vector< TableDescriptor > getAllTableMetadataCopy() const
Definition: Catalog.cpp:2292
void deleteCustomExpressions(const std::vector< int32_t > &custom_expression_ids, bool do_soft_delete)
Definition: Catalog.cpp:5732
void addReferenceToForeignDict(ColumnDescriptor &referencing_column, Parser::SharedDictionaryDef shared_dict_def, const bool persist_reference)
Definition: Catalog.cpp:3774
const ColumnDescriptor * getDeletedColumn(const TableDescriptor *td) const
Definition: Catalog.cpp:3706
void setDeletedColumn(const TableDescriptor *td, const ColumnDescriptor *cd)
Definition: Catalog.cpp:3749
ColumnDescriptorMap columnDescriptorMap_
Definition: Catalog.h:681
void createTable(TableDescriptor &td, const std::list< ColumnDescriptor > &columns, const std::vector< Parser::SharedDictionaryDef > &shared_dict_defs, bool isLogicalTable)
Definition: Catalog.cpp:2743
void updateFrontendViewAndLinkUsers()
Definition: Catalog.cpp:470
void createForeignServer(std::unique_ptr< foreign_storage::ForeignServer > foreign_server, bool if_not_exists)
Definition: Catalog.cpp:3091
TableEpochInfo(const int32_t table_id_param, const int32_t table_epoch_param, const size_t leaf_index_param)
Definition: Catalog.h:96
std::map< ColumnKey, ColumnDescriptor * > ColumnDescriptorMap
Definition: Types.h:38
std::string dumpCreateServer(const std::string &name, bool multiline_formatting=true) const
Definition: Catalog.cpp:5409
std::map< int32_t, std::vector< int32_t >> LogicalToPhysicalTableMapById
Definition: Types.h:36
Data_Namespace::DataMgr & getDataMgr() const
Definition: Catalog.h:249
void reloadCatalogMetadata(const std::map< int32_t, std::string > &user_name_by_user_id)
Definition: Catalog.cpp:1288
void addColumn(const TableDescriptor &td, ColumnDescriptor &cd)
Definition: Catalog.cpp:2418
int32_t createCustomExpression(std::unique_ptr< CustomExpression > custom_expression)
Definition: Catalog.cpp:5607
void roll(const bool forward)
Definition: Catalog.cpp:2514
bool validateNonExistentTableOrView(const std::string &name, const bool if_not_exists)
Definition: Catalog.cpp:5435
void setTableFileMgrParams(const int table_id, const File_Namespace::FileMgrParams &file_mgr_params)
Definition: Catalog.cpp:3603
std::vector< const TableDescriptor * > getAllForeignTablesForRefresh() const
Definition: Catalog.cpp:5446
std::map< int, std::unique_ptr< CustomExpression >> CustomExpressionMapById
Definition: Types.h:53
const foreign_storage::ForeignServer * getForeignServer(const std::string &server_name) const
Definition: Catalog.cpp:3142
std::list< const TableDescriptor * > getAllTableMetadata() const
Definition: Catalog.cpp:2283
static constexpr const char * DASHBOARDS_SYS_TABLE_NAME
Definition: Catalog.h:106
SqliteConnector sqliteConnector_
Definition: Catalog.h:692
const std::vector< LeafHostInfo > string_dict_hosts_
Definition: Catalog.h:696
const DBMetadata currentDB_
Definition: Catalog.h:693
DictDescriptorMapById dictDescriptorMapByRef_
Definition: Catalog.h:683
void setColumnDictionary(ColumnDescriptor &cd, std::list< DictDescriptor > &dds, const TableDescriptor &td, bool is_logical_table, bool use_temp_dictionary=false)
Definition: Catalog.cpp:3865
std::shared_ptr< Data_Namespace::DataMgr > dataMgr_
Definition: Catalog.h:694
const LinkDescriptor * getMetadataForLink(const std::string &link) const
const std::optional< std::string > getColumnName(int table_id, int column_id) const
Definition: Catalog.cpp:2063
std::vector< DashboardDescriptor > getAllDashboardsMetadataCopy() const
Definition: Catalog.cpp:2312
void dropTableFromJsonUnlocked(const std::string &table_name) const
Definition: Catalog.cpp:3059
void setForReload(const int32_t tableId)
Definition: Catalog.cpp:5028
int32_t getTableEpoch(const int32_t db_id, const int32_t table_id) const
Definition: Catalog.cpp:3387
void deleteTableCatalogMetadata(const TableDescriptor *logical_table, const std::vector< const TableDescriptor * > &physical_tables)
Definition: Catalog.cpp:4114
void replaceDashboard(DashboardDescriptor &vd)
Definition: Catalog.cpp:4555
void initializeServerLogsSystemTables()
Definition: Catalog.cpp:6330
std::string dumpCreateTableUnlocked(const TableDescriptor *td, bool multiline_formatting, bool dump_defaults) const
Definition: Catalog.cpp:5248
std::vector< std::string > getTableDataDirectories(const TableDescriptor *td) const
Definition: Catalog.cpp:5037
void updateCustomExpression(int32_t custom_expression_id, const std::string &expression_json)
Definition: Catalog.cpp:5704
std::string generatePhysicalTableName(const std::string &logicalTableName, const int32_t &shardNumber)
Definition: Catalog.cpp:4916
void dropColumn(const TableDescriptor &td, const ColumnDescriptor &cd)
Definition: Catalog.cpp:2481
void checkDateInDaysColumnMigration()
Definition: Catalog.cpp:925
static constexpr const char * LOGS_SERVER_NAME
Definition: Catalog.h:841
void addFrontendViewToMap(DashboardDescriptor &vd)
Definition: Catalog.cpp:1778
std::vector< const foreign_storage::ForeignTable * > getAllForeignTablesForForeignServer(const int32_t foreign_server_id)
Get all of the foreign tables for associated with a foreign server id.
Definition: Catalog.cpp:3439
std::vector< TableMetadata > getTablesMetadataForUser(const UserMetadata &user_metadata, const GetTablesType get_tables_type, const std::string &filter_table_name) const
Definition: Catalog.cpp:4815
void reloadCatalogMetadataUnlocked(const std::map< int32_t, std::string > &user_name_by_user_id)
Definition: Catalog.cpp:1296
std::unique_ptr< CustomExpression > getCustomExpressionFromConnector(size_t row)
Definition: Catalog.cpp:1621
std::vector< std::pair< int32_t, int32_t > > getAllPersistedTableAndShardIds() const
Definition: Catalog.cpp:4720
TableDescriptor * getMutableMetadataForTableUnlocked(int table_id) const
Definition: Catalog.cpp:1991
const ColumnDescriptor * getShardColumnMetadataForTable(const TableDescriptor *td) const
Definition: Catalog.cpp:4682
void changeForeignServerOwner(const std::string &server_name, const int new_owner_id)
Definition: Catalog.cpp:3194
std::optional< int32_t > getTableId(const std::string &table_name) const
Definition: Catalog.cpp:1973
std::atomic< std::thread::id > thread_holding_sqlite_lock
Definition: Catalog.h:852
void renameColumn(const TableDescriptor *td, const ColumnDescriptor *cd, const std::string &newColumnName)
Definition: Catalog.cpp:4452
DeletedColumnPerTableMap deletedColumnPerTable_
Definition: Catalog.h:737
ColumnDescriptorMapById columnDescriptorMapById_
Definition: Catalog.h:682
DashboardDescriptorMap dashboardDescriptorMap_
Definition: Catalog.h:684
void setForeignServerOptions(const std::string &server_name, const std::string &options)
Definition: Catalog.cpp:3226
std::vector< std::string > getTableNamesForUser(const UserMetadata &user, const GetTablesType get_tables_type) const
Definition: Catalog.cpp:4800
void addTableToMap(const TableDescriptor *td, const std::list< ColumnDescriptor > &columns, const std::list< DictDescriptor > &dicts)
Definition: Catalog.cpp:1637
void getAllColumnMetadataForTableImpl(const TableDescriptor *td, std::list< const ColumnDescriptor * > &colDescs, const bool fetchSystemColumns, const bool fetchVirtualColumns, const bool fetchPhysicalColumns) const
Definition: Catalog.cpp:2237
void resetTableEpochFloor(const int logicalTableId) const
Definition: Catalog.cpp:4871
TableEpochInfo(const int32_t table_id_param, const int32_t table_epoch_param)
Definition: Catalog.h:94
void setForeignTableOptions(const std::string &table_name, foreign_storage::OptionsMap &options_map, bool clear_existing_options=true)
Definition: Catalog.cpp:5490
static constexpr const char * REQUEST_LOGS_SYS_TABLE_NAME
Definition: Catalog.h:115
void recordOwnershipOfObjectsInObjectPermissions()
Definition: Catalog.cpp:797
void updateFrontendViewsToDashboards()
Definition: Catalog.cpp:129
bool filterTableByTypeAndUser(const TableDescriptor *td, const UserMetadata &user_metadata, const GetTablesType get_tables_type) const
Definition: Catalog.cpp:4767
const bool checkMetadataForDeletedRecs(const TableDescriptor *td, int column_id) const
Definition: Catalog.cpp:3712
void restoreOldOwnersInMemory(const std::map< int32_t, std::string > &old_owners_user_name_by_id, const std::map< int32_t, std::vector< DBObject >> &old_owner_db_objects, int32_t new_owner_id)
Definition: Catalog.cpp:6007
std::string quoteIfRequired(const std::string &column_name) const
Definition: Catalog.cpp:5530
void initializeMemorySummarySystemTable()
Definition: Catalog.cpp:6264
std::string name() const
Definition: Catalog.h:321
std::list< const DashboardDescriptor * > getAllDashboardsMetadata() const
Definition: Catalog.cpp:2303
void updateLeaf(const LeafHostInfo &string_dict_host)
void initializeWebServerLogsSystemTables()
Definition: Catalog.cpp:6392
void removeChunks(const int table_id) const
Definition: Catalog.cpp:4076
static constexpr const char * ROLES_SYS_TABLE_NAME
Definition: Catalog.h:109
This file contains the class specification and related data structures for SysCatalog.
std::map< ColumnIdKey, ColumnDescriptor * > ColumnDescriptorMapById
Definition: Types.h:40
std::string calculateSHA1(const std::string &data)
Definition: Catalog.cpp:4632
void gatherAdditionalInfo(std::vector< std::string > &additional_info, std::set< std::string > &shared_dict_column_names, const TableDescriptor *td) const
Definition: Catalog.cpp:5541
void buildLogicalToPhysicalMapUnlocked()
Definition: Catalog.cpp:1557
const DBMetadata & getCurrentDB() const
Definition: Catalog.h:248
void addLinkToMap(LinkDescriptor &ld)
Definition: Catalog.cpp:1865
std::shared_ptr< Calcite > getCalciteMgr() const
Definition: Catalog.h:250
static const std::string getForeignTableSchema(bool if_not_exists=false)
Definition: Catalog.cpp:782
void initializeStorageDetailsSystemTable()
Definition: Catalog.cpp:6304
std::map< int, TableDescriptor * > TableDescriptorMapById
Definition: Types.h:35
const ColumnDescriptor * getDeletedColumnIfRowsDeleted(const TableDescriptor *td) const
Definition: Catalog.cpp:3724
void adjustAlteredTableFiles(const std::string &temp_data_dir, const std::unordered_map< int, int > &all_column_ids_map) const
std::map< std::string, LinkDescriptor * > LinkDescriptorMap
Definition: Types.h:45
void delDictionary(const ColumnDescriptor &cd)
Definition: Catalog.cpp:2347
GetTablesType
Definition: Catalog.h:63
void restoreOldOwners(const std::map< int32_t, std::string > &old_owners_user_name_by_id, const std::map< int32_t, std::vector< DBObject >> &old_owner_db_objects, int32_t new_owner_id)
Definition: Catalog.cpp:5958
void dropForeignServer(const std::string &server_name)
Definition: Catalog.cpp:3258
void setDeletedColumnUnlocked(const TableDescriptor *td, const ColumnDescriptor *cd)
Definition: Catalog.cpp:3754
void dropTable(const TableDescriptor *td)
Definition: Catalog.cpp:4086
void buildDashboardsMapUnlocked(const std::map< int32_t, std::string > &user_name_by_user_id)
Definition: Catalog.cpp:1512
void initializeRoleAssignmentsSystemTable()
Definition: Catalog.cpp:6255
const ColumnDescriptor * getMetadataForColumn(int tableId, const std::string &colName) const
static const std::string getForeignServerSchema(bool if_not_exists=false)
Definition: Catalog.cpp:775
int getDatabaseId() const
Definition: Catalog.h:304
const DashboardDescriptor * getMetadataForDashboard(const std::string &userId, const std::string &dashName) const
static constexpr const char * MEMORY_SUMMARY_SYS_TABLE_NAME
Definition: Catalog.h:111
TableDescriptorMapById tableDescriptorMapById_
Definition: Catalog.h:680
int getLogicalTableId(const int physicalTableId) const
Definition: Catalog.cpp:4839
void invalidateCachesForTable(const int table_id)
Definition: Catalog.cpp:4038
const CustomExpression * getCustomExpression(int32_t custom_expression_id) const
Definition: Catalog.cpp:5656
const DictDescriptor * getMetadataForDict(int dict_ref, bool loadDict=true) const
Definition: Catalog.cpp:1999
specifies the content in-memory of a row in the column metadata table
static constexpr const char * ROLE_ASSIGNMENTS_SYS_TABLE_NAME
Definition: Catalog.h:110
void setForeignTableProperty(const foreign_storage::ForeignTable *table, const std::string &property, const std::string &value)
Definition: Catalog.cpp:5510
static void expandGeoColumn(const ColumnDescriptor &cd, std::list< ColumnDescriptor > &columns)
Definition: Catalog.cpp:2570
void buildCustomExpressionsMapUnlocked()
Definition: Catalog.cpp:1609
const std::vector< LeafHostInfo > & getStringDictionaryHosts() const
Definition: Catalog.cpp:2035
void checkpointWithAutoRollback(const int logical_table_id) const
Definition: Catalog.cpp:4861
static constexpr const char * USERS_SYS_TABLE_NAME
Definition: Catalog.h:104
std::vector< const TableDescriptor * > getPhysicalTablesDescriptors(const TableDescriptor *logical_table_desc, bool populate_fragmenter=true) const
Definition: Catalog.cpp:4700
void setMaxRows(const int32_t table_id, const int64_t max_rows)
Definition: Catalog.cpp:3565
void createOrUpdateDashboardSystemRole(const std::string &view_meta, const int32_t &user_id, const std::string &dash_role_name)
Definition: Catalog.cpp:1819
const ColumnDescriptor * getMetadataForColumnBySpi(const int tableId, const size_t spi) const
Definition: Catalog.cpp:2096
ForeignServerMapById foreignServerMapById_
Definition: Catalog.h:688
void alterPhysicalTableMetadata(const TableDescriptor *td, const TableDescriptorUpdateParams &table_update_params)
Definition: Catalog.cpp:3488
static constexpr const char * DATABASES_SYS_TABLE_NAME
Definition: Catalog.h:107
ForeignServerMap foreignServerMap_
Definition: Catalog.h:687
void createShardedTable(TableDescriptor &td, const std::list< ColumnDescriptor > &columns, const std::vector< Parser::SharedDictionaryDef > &shared_dict_defs)
Definition: Catalog.cpp:3908
std::map< std::string, std::shared_ptr< foreign_storage::ForeignServer >> ForeignServerMap
Definition: Types.h:50
void reassignOwners(const std::set< std::string > &old_owners, const std::string &new_owner)
Definition: Catalog.cpp:5824
std::vector< const CustomExpression * > getCustomExpressionsForUser(const UserMetadata &user) const
Definition: Catalog.cpp:5679
void checkpoint(const int logicalTableId) const
Definition: Catalog.cpp:4853
void createForeignServerNoLocks(std::unique_ptr< foreign_storage::ForeignServer > foreign_server, bool if_not_exists)
Definition: Catalog.cpp:3099
void initializeMemoryDetailsSystemTable()
Definition: Catalog.cpp:6280
static constexpr const char * TABLES_SYS_TABLE_NAME
Definition: Catalog.h:105
std::vector< std::pair< ColumnDescriptor *, ColumnDescriptor * >> ColumnDescriptorsForRoll
Definition: Catalog.h:710
std::shared_ptr< Calcite > calciteMgr_
Definition: Catalog.h:697
static const std::string physicalTableNameTag_
Definition: Catalog.h:701
void addFrontendViewToMapNoLock(DashboardDescriptor &vd)
Definition: Catalog.cpp:1783
void reloadTableMetadata(int table_id)
Definition: Catalog.cpp:1088
void setTableEpoch(const int db_id, const int table_id, const int new_epoch)
Definition: Catalog.cpp:3455
void alterTableMetadata(const TableDescriptor *td, const TableDescriptorUpdateParams &table_update_params)
Definition: Catalog.cpp:3515
std::vector< std::string > getTableDictDirectories(const TableDescriptor *td) const
Definition: Catalog.cpp:5072
void getForeignServersForUser(const rapidjson::Value *filters, const UserMetadata &user, std::vector< const foreign_storage::ForeignServer * > &results)
Definition: Catalog.cpp:3292
std::map< DictRef, std::unique_ptr< DictDescriptor >> DictDescriptorMapById
Definition: Types.h:42
std::map< std::string, std::shared_ptr< DashboardDescriptor >> DashboardDescriptorMap
Definition: Types.h:44
static const std::string getCustomExpressionsSchema(bool if_not_exists=false)
Definition: Catalog.cpp:790
static constexpr const char * PERMISSIONS_SYS_TABLE_NAME
Definition: Catalog.h:108
std::list< const ColumnDescriptor * > getAllColumnMetadataForTable(const int tableId, const bool fetchSystemColumns, const bool fetchVirtualColumns, const bool fetchPhysicalColumns) const
Returns a list of pointers to constant ColumnDescriptor structs for all the columns from a particular...
Definition: Catalog.cpp:2267
const Catalog * getObjForLock()
Definition: Catalog.cpp:257
static constexpr const char * STORAGE_DETAILS_SYS_TABLE_NAME
Definition: Catalog.h:113
int32_t createDashboard(DashboardDescriptor &vd)
Definition: Catalog.cpp:4491
void removeTableFromMap(const std::string &tableName, const int tableId, const bool is_on_error=false)
Definition: Catalog.cpp:1696
std::map< int32_t, std::set< const ColumnDescriptor * >> TableDictColumnsMap
Definition: Types.h:41
void removeFragmenterForTable(const int table_id) const
Definition: Catalog.cpp:4064
std::map< int, LinkDescriptor * > LinkDescriptorMapById
Definition: Types.h:46
std::map< int, std::shared_ptr< foreign_storage::ForeignServer >> ForeignServerMapById
Definition: Types.h:52
const std::unique_ptr< const CustomExpression > getCustomExpressionFromStorage(int32_t custom_expression_id)
Definition: Catalog.cpp:5665
void initializeRequestLogsSystemTables()
Definition: Catalog.cpp:6355
static constexpr const char * CATALOG_SERVER_NAME
Definition: Catalog.h:838
const int getColumnIdBySpiUnlocked(const int table_id, const size_t spi) const
Definition: Catalog.cpp:2073
void eraseTableMetadata(const TableDescriptor *td)
Definition: Catalog.cpp:4136
bool setColumnSharedDictionary(ColumnDescriptor &cd, std::list< ColumnDescriptor > &cdd, std::list< DictDescriptor > &dds, const TableDescriptor td, const std::vector< Parser::SharedDictionaryDef > &shared_dict_defs)
Definition: Catalog.cpp:3796
void updateCustomExpressionsSchema()
Definition: Catalog.cpp:763
std::set< std::string > getTableDictDirectoryPaths(int32_t table_id) const
Definition: Catalog.cpp:5085
std::unique_ptr< heavyai::DistributedSharedMutex > dsqliteMutex_
Definition: Catalog.h:849
bool isInfoSchemaDb() const
Definition: Catalog.cpp:6052
void setTableEpochs(const int32_t db_id, const std::vector< TableEpochInfo > &table_epochs) const
Definition: Catalog.cpp:3658
std::map< std::string, std::string, std::less<>> OptionsMap
void setMaxRollbackEpochs(const int32_t table_id, const int32_t max_rollback_epochs)
Definition: Catalog.cpp:3540
std::optional< std::string > getTableName(int32_t table_id) const
Definition: Catalog.cpp:1964
void reloadTableMetadataUnlocked(int table_id)
Definition: Catalog.cpp:1095
void updateForeignTablesInMapUnlocked()
Definition: Catalog.cpp:4943
std::string createLink(LinkDescriptor &ld, size_t min_length)
Definition: Catalog.cpp:4644
Descriptor for a dictionary for a string columne.
void updateLogicalToPhysicalTableLinkSchema()
Definition: Catalog.cpp:631
void setUncappedTableEpoch(const std::string &table_name)
Definition: Catalog.cpp:3584
CustomExpressionMapById custom_expr_map_by_id_
Definition: Catalog.h:689
std::atomic< std::thread::id > thread_holding_write_lock
Definition: Catalog.h:853
static constexpr std::array< const char *, 4 > INTERNAL_SERVERS
Definition: Catalog.h:842
foreign_storage::ForeignTable * getForeignTableUnlocked(const std::string &tableName) const
Definition: Catalog.cpp:1913
void setForeignServerDataWrapper(const std::string &server_name, const std::string &data_wrapper)
Definition: Catalog.cpp:3205
std::unique_ptr< heavyai::DistributedSharedMutex > dcatalogMutex_
Definition: Catalog.h:848
void setTableEpochsLogExceptions(const int32_t db_id, const std::vector< TableEpochInfo > &table_epochs) const
Definition: Catalog.cpp:3694
static const std::array< std::string, 4 > kAggregatorOnlySystemTables
Definition: Catalog.h:120
const TableDescriptor * getMetadataForTable(const std::string &tableName, const bool populateFragmenter=true) const
Returns a pointer to a const TableDescriptor struct matching the provided tableName.
SqliteConnector & getSqliteConnector()
Definition: Catalog.h:305
const std::string & getCatalogBasePath() const
Definition: Catalog.h:251
DictRef addDictionary(ColumnDescriptor &cd)
Definition: Catalog.cpp:2322
std::shared_timed_mutex shared_mutex
const std::unique_ptr< const foreign_storage::ForeignTable > getForeignTableFromStorage(int table_id)
Definition: Catalog.cpp:3174
void refreshDictionaryCachesForTableUnlocked(const TableDescriptor &td)
Definition: Catalog.cpp:4018
void renameTable(const TableDescriptor *td, const std::string &newTableName)
LinkDescriptorMapById linkDescriptorMapById_
Definition: Catalog.h:686
std::string dumpSchema(const TableDescriptor *td) const
Definition: Catalog.cpp:5103
void updateForeignTableRefreshTimes(const int32_t table_id)
Definition: Catalog.cpp:5468
ColumnDescriptorsForRoll columnDescriptorsForRoll
Definition: Catalog.h:711
static constexpr const char * MEMORY_STATS_SERVER_NAME
Definition: Catalog.h:839
bool recreateSystemTableIfUpdated(foreign_storage::ForeignTable &foreign_table, const std::list< ColumnDescriptor > &columns)
Definition: Catalog.cpp:6507
void doTruncateTable(const TableDescriptor *td)
Definition: Catalog.cpp:3952
void createSystemTableServer(const std::string &server_name, const std::string &data_wrapper_type, const foreign_storage::OptionsMap &options={})
Definition: Catalog.cpp:6442
const std::map< int, const ColumnDescriptor * > getDictionaryToColumnMapping()
Definition: Catalog.cpp:4736
void renamePhysicalTable(const TableDescriptor *td, const std::string &newTableName)
void renameForeignServer(const std::string &server_name, const std::string &name)
Definition: Catalog.cpp:3246
std::vector< DBObject > parseDashboardObjects(const std::string &view_meta, const int &user_id)
Definition: Catalog.cpp:1789
static constexpr const char * WS_SERVER_LOGS_SYS_TABLE_NAME
Definition: Catalog.h:116
void addToColumnMap(ColumnDescriptor *cd)
Definition: Catalog.cpp:6561
const std::unique_ptr< const foreign_storage::ForeignServer > getForeignServerFromStorage(const std::string &server_name)
Definition: Catalog.cpp:3154
static constexpr const char * STORAGE_STATS_SERVER_NAME
Definition: Catalog.h:840
LogicalToPhysicalTableMapById logicalToPhysicalTableMapById_
Definition: Catalog.h:699
Catalog()
Constructor builds a hollow catalog used during constructor of other catalogs.
Definition: Catalog.cpp:171
TableDescriptorMap tableDescriptorMap_
Definition: Catalog.h:679
void setForeignServerProperty(const std::string &server_name, const std::string &property, const std::string &value)
Definition: Catalog.cpp:4973
static thread_local bool thread_holds_read_lock
Definition: Catalog.h:855
std::map< std::string, TableDescriptor * > TableDescriptorMap
Definition: Types.h:34
void initializeDashboardsSystemTable()
Definition: Catalog.cpp:6239
LinkDescriptorMap linkDescriptorMap_
Definition: Catalog.h:685
void CheckAndExecuteMigrationsPostBuildMaps()
Definition: Catalog.cpp:1031
std::vector< TableEpochInfo > getTableEpochs(const int32_t db_id, const int32_t table_id) const
Definition: Catalog.cpp:3630
const int getColumnIdBySpi(const int tableId, const size_t spi) const
Definition: Catalog.cpp:2091
void createDefaultServersIfNotExists()
Definition: Catalog.cpp:4994
void truncateTable(const TableDescriptor *td)
Definition: Catalog.cpp:3944
void initializeWebServerAccessLogsSystemTables()
Definition: Catalog.cpp:6415
void updateLogicalToPhysicalTableMap(const int32_t logical_tb_id)
Definition: Catalog.cpp:645