OmniSciDB  cde582ebc3
 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 
155  ~Catalog();
156 
157  static void expandGeoColumn(const ColumnDescriptor& cd,
158  std::list<ColumnDescriptor>& columns);
159  void createTable(TableDescriptor& td,
160  const std::list<ColumnDescriptor>& columns,
161  const std::vector<Parser::SharedDictionaryDef>& shared_dict_defs,
162  bool isLogicalTable);
163  void createShardedTable(
164  TableDescriptor& td,
165  const std::list<ColumnDescriptor>& columns,
166  const std::vector<Parser::SharedDictionaryDef>& shared_dict_defs);
169  std::string createLink(LinkDescriptor& ld, size_t min_length);
170  void dropTable(const TableDescriptor* td);
171  void truncateTable(const TableDescriptor* td);
172  void renameTable(const TableDescriptor* td, const std::string& newTableName);
173  void renameTable(std::vector<std::pair<std::string, std::string>>& names);
174  void renameColumn(const TableDescriptor* td,
175  const ColumnDescriptor* cd,
176  const std::string& newColumnName);
177  void addColumn(const TableDescriptor& td, ColumnDescriptor& cd);
178  void dropColumn(const TableDescriptor& td, const ColumnDescriptor& cd);
179  void invalidateCachesForTable(const int table_id);
180  void removeFragmenterForTable(const int table_id) const;
181 
182  const std::map<int, const ColumnDescriptor*> getDictionaryToColumnMapping();
183 
192  const TableDescriptor* getMetadataForTable(const std::string& tableName,
193  const bool populateFragmenter = true) const;
194  const TableDescriptor* getMetadataForTable(int tableId,
195  bool populateFragmenter = true) const;
196 
197  std::optional<std::string> getTableName(int32_t table_id) const;
198  std::optional<int32_t> getTableId(const std::string& table_name) const;
199 
200  const ColumnDescriptor* getMetadataForColumn(int tableId,
201  const std::string& colName) const;
202  const ColumnDescriptor* getMetadataForColumn(int tableId, int columnId) const;
203  const std::optional<std::string> getColumnName(int table_id, int column_id) const;
204 
205  const int getColumnIdBySpi(const int tableId, const size_t spi) const;
206  const ColumnDescriptor* getMetadataForColumnBySpi(const int tableId,
207  const size_t spi) const;
208 
209  const DashboardDescriptor* getMetadataForDashboard(const std::string& userId,
210  const std::string& dashName) const;
211 
212  const DashboardDescriptor* getMetadataForDashboard(const int32_t dashboard_id) const;
213  void deleteMetadataForDashboards(const std::vector<int32_t> ids,
214  const UserMetadata& user);
215 
216  const LinkDescriptor* getMetadataForLink(const std::string& link) const;
217  const LinkDescriptor* getMetadataForLink(int linkId) const;
218 
220  const std::string& tableName) const;
221 
222  const foreign_storage::ForeignTable* getForeignTable(int table_id) const;
223 
232  std::list<const ColumnDescriptor*> getAllColumnMetadataForTable(
233  const int tableId,
234  const bool fetchSystemColumns,
235  const bool fetchVirtualColumns,
236  const bool fetchPhysicalColumns) const;
237 
238  std::list<const TableDescriptor*> getAllTableMetadata() const;
239  std::vector<TableDescriptor> getAllTableMetadataCopy() const;
240  std::list<const DashboardDescriptor*> getAllDashboardsMetadata() const;
241  std::vector<DashboardDescriptor> getAllDashboardsMetadataCopy() const;
242  const DBMetadata& getCurrentDB() const { return currentDB_; }
244  std::shared_ptr<Calcite> getCalciteMgr() const { return calciteMgr_; }
245  const std::string& getCatalogBasePath() const { return basePath_; }
246 
247  const DictDescriptor* getMetadataForDict(int dict_ref, bool loadDict = true) const;
248 
249  const std::vector<LeafHostInfo>& getStringDictionaryHosts() const;
250 
252 
253  std::vector<const TableDescriptor*> getPhysicalTablesDescriptors(
254  const TableDescriptor* logical_table_desc,
255  bool populate_fragmenter = true) const;
256 
257  std::vector<std::pair<int32_t, int32_t>> getAllPersistedTableAndShardIds() const;
258 
267  std::vector<std::string> getTableNamesForUser(
268  const UserMetadata& user,
269  const GetTablesType get_tables_type) const;
270 
280  std::vector<TableMetadata> getTablesMetadataForUser(
281  const UserMetadata& user_metadata,
282  const GetTablesType get_tables_type,
283  const std::string& filter_table_name) const;
284 
285  int32_t getTableEpoch(const int32_t db_id, const int32_t table_id) const;
286  void setTableEpoch(const int db_id, const int table_id, const int new_epoch);
287  void setMaxRollbackEpochs(const int32_t table_id, const int32_t max_rollback_epochs);
288  void setMaxRows(const int32_t table_id, const int64_t max_rows);
289 
290  std::vector<TableEpochInfo> getTableEpochs(const int32_t db_id,
291  const int32_t table_id) const;
292  void setTableEpochs(const int32_t db_id,
293  const std::vector<TableEpochInfo>& table_epochs) const;
294 
295  void setTableEpochsLogExceptions(const int32_t db_id,
296  const std::vector<TableEpochInfo>& table_epochs) const;
297 
298  int getDatabaseId() const { return currentDB_.dbId; }
300  void roll(const bool forward);
302  void delDictionary(const ColumnDescriptor& cd);
303  void getDictionary(const ColumnDescriptor& cd,
304  std::map<int, StringDictionary*>& stringDicts);
305 
306  const bool checkMetadataForDeletedRecs(const TableDescriptor* td, int column_id) const;
307  const ColumnDescriptor* getDeletedColumn(const TableDescriptor* td) const;
309 
310  void setDeletedColumn(const TableDescriptor* td, const ColumnDescriptor* cd);
311  int getLogicalTableId(const int physicalTableId) const;
312  void checkpoint(const int logicalTableId) const;
313  void checkpointWithAutoRollback(const int logical_table_id) const;
314  void resetTableEpochFloor(const int logicalTableId) const;
315  std::string name() const { return getCurrentDB().dbName; }
316  void eraseDbMetadata();
317  void eraseDbPhysicalData();
318  void eraseTablePhysicalData(const TableDescriptor* td);
319  void setForReload(const int32_t tableId);
320 
321  std::vector<std::string> getTableDataDirectories(const TableDescriptor* td) const;
322  std::vector<std::string> getTableDictDirectories(const TableDescriptor* td) const;
323  std::set<std::string> getTableDictDirectoryPaths(int32_t table_id) const;
324  std::string getColumnDictDirectory(const ColumnDescriptor* cd,
325  bool file_name_only = true) const;
326  std::string dumpSchema(const TableDescriptor* td) const;
327  std::string dumpCreateTable(const TableDescriptor* td,
328  bool multiline_formatting = true,
329  bool dump_defaults = false) const;
330  std::optional<std::string> dumpCreateTable(int32_t table_id,
331  bool multiline_formatting = true,
332  bool dump_defaults = false) const;
333  std::string dumpCreateServer(const std::string& name,
334  bool multiline_formatting = true) const;
335 
343  static const std::string getForeignTableSchema(bool if_not_exists = false);
344 
352  static const std::string getForeignServerSchema(bool if_not_exists = false);
353 
363  void createForeignServer(std::unique_ptr<foreign_storage::ForeignServer> foreign_server,
364  bool if_not_exists);
365 
374  const std::string& server_name) const;
375 
385  const std::unique_ptr<const foreign_storage::ForeignServer> getForeignServerFromStorage(
386  const std::string& server_name);
387 
397  const std::unique_ptr<const foreign_storage::ForeignTable> getForeignTableFromStorage(
398  int table_id);
399 
406  void changeForeignServerOwner(const std::string& server_name, const int new_owner_id);
407 
414  void setForeignServerDataWrapper(const std::string& server_name,
415  const std::string& data_wrapper);
422  void setForeignServerOptions(const std::string& server_name,
423  const std::string& options);
430  void renameForeignServer(const std::string& server_name, const std::string& name);
431 
437  void dropForeignServer(const std::string& server_name);
438 
446  std::vector<const foreign_storage::ForeignTable*> getAllForeignTablesForForeignServer(
447  const int32_t foreign_server_id);
448 
462  const rapidjson::Value* filters,
463  const UserMetadata& user,
464  std::vector<const foreign_storage::ForeignServer*>& results);
465 
470 
481  bool validateNonExistentTableOrView(const std::string& name, const bool if_not_exists);
482 
490  std::vector<const TableDescriptor*> getAllForeignTablesForRefresh() const;
491 
498  void updateForeignTableRefreshTimes(const int32_t table_id);
499 
506  void setForeignTableOptions(const std::string& table_name,
507  foreign_storage::OptionsMap& options_map,
508  bool clear_existing_options = true);
509 
510  void updateLeaf(const LeafHostInfo& string_dict_host);
511 
512  // For testing purposes only
513  void setUncappedTableEpoch(const std::string& table_name);
514 
515  // Methods for accessing and updating custom expressions
516 
524  static const std::string getCustomExpressionsSchema(bool if_not_exists = false);
525 
533  int32_t createCustomExpression(std::unique_ptr<CustomExpression> custom_expression);
534 
542  const CustomExpression* getCustomExpression(int32_t custom_expression_id) const;
543 
553  const std::unique_ptr<const CustomExpression> getCustomExpressionFromStorage(
554  int32_t custom_expression_id);
555 
564  std::vector<const CustomExpression*> getCustomExpressionsForUser(
565  const UserMetadata& user) const;
566 
573  void updateCustomExpression(int32_t custom_expression_id,
574  const std::string& expression_json);
575 
582  void deleteCustomExpressions(const std::vector<int32_t>& custom_expression_ids,
583  bool do_soft_delete);
584 
593  void reassignOwners(const std::set<std::string>& old_owners,
594  const std::string& new_owner);
595 
596  bool isInfoSchemaDb() const;
597 
598  protected:
601  void updateDictionaryNames();
604  void updateGeoColumns();
606  void updateLinkSchema();
609  void updateLogicalToPhysicalTableMap(const int32_t logical_tb_id);
610  void updateDictionarySchema();
611  void updatePageSize();
616  void updateFsiSchemas();
621  void buildMaps();
622  void addTableToMap(const TableDescriptor* td,
623  const std::list<ColumnDescriptor>& columns,
624  const std::list<DictDescriptor>& dicts);
625  void addReferenceToForeignDict(ColumnDescriptor& referencing_column,
626  Parser::SharedDictionaryDef shared_dict_def,
627  const bool persist_reference);
629  ColumnDescriptor& cd,
630  std::list<ColumnDescriptor>& cdd,
631  std::list<DictDescriptor>& dds,
632  const TableDescriptor td,
633  const std::vector<Parser::SharedDictionaryDef>& shared_dict_defs);
635  std::list<DictDescriptor>& dds,
636  const TableDescriptor& td,
637  bool is_logical_table,
638  bool use_temp_dictionary = false);
641  void addLinkToMap(LinkDescriptor& ld);
642  void removeTableFromMap(const std::string& tableName,
643  const int tableId,
644  const bool is_on_error = false);
645  void eraseTableMetadata(const TableDescriptor* td);
647  void doTruncateTable(const TableDescriptor* td);
648  void renamePhysicalTable(const TableDescriptor* td, const std::string& newTableName);
649  void renamePhysicalTable(std::vector<std::pair<std::string, std::string>>& names,
650  std::vector<int>& tableIds);
651  void instantiateFragmenter(TableDescriptor* td) const;
653  std::list<const ColumnDescriptor*>& colDescs,
654  const bool fetchSystemColumns,
655  const bool fetchVirtualColumns,
656  const bool fetchPhysicalColumns) const;
657  std::string calculateSHA1(const std::string& data);
658  std::string generatePhysicalTableName(const std::string& logicalTableName,
659  const int32_t& shardNumber);
660  std::vector<DBObject> parseDashboardObjects(const std::string& view_meta,
661  const int& user_id);
662  void createOrUpdateDashboardSystemRole(const std::string& view_meta,
663  const int32_t& user_id,
664  const std::string& dash_role_name);
665 
666  const int getColumnIdBySpiUnlocked(const int table_id, const size_t spi) const;
667 
669  const std::list<ColumnDescriptor>& cds) const;
670  void dropTableFromJsonUnlocked(const std::string& table_name) const;
671 
672  std::string basePath_;
685 
688  std::shared_ptr<Data_Namespace::DataMgr> dataMgr_;
689 
690  const std::vector<LeafHostInfo> string_dict_hosts_;
691  std::shared_ptr<Calcite> calciteMgr_;
692 
694  static const std::string
695  physicalTableNameTag_; // extra component added to the name of each physical table
698 
699  // this tuple is for rolling forw/back once after ALTER ADD/DEL/MODIFY columns
700  // succeeds/fails
701  // get(0) = old ColumnDescriptor*
702  // get(1) = new ColumnDescriptor*
704  std::vector<std::pair<ColumnDescriptor*, ColumnDescriptor*>>;
706 
707  private:
709  void reloadTableMetadata(int table_id);
710  template <class T>
711  friend class lockmgr::TableLockMgrImpl; // for reloadTableMetadataUnlocked()
712  void reloadTableMetadataUnlocked(int table_id);
713  void reloadCatalogMetadata(const std::map<int32_t, std::string>& user_name_by_user_id);
715  const std::map<int32_t, std::string>& user_name_by_user_id);
716  void buildTablesMapUnlocked();
720  const std::map<int32_t, std::string>& user_name_by_user_id);
721  void buildLinksMapUnlocked();
724 
725  void gatherAdditionalInfo(std::vector<std::string>& additional_info,
726  std::set<std::string>& shared_dict_column_names,
727  const TableDescriptor* td) const;
728  std::string quoteIfRequired(const std::string& column_name) const;
731  const std::string& temp_data_dir,
732  const std::unordered_map<int, int>& all_column_ids_map) const;
733  void renameTableDirectories(const std::string& temp_data_dir,
734  const std::vector<std::string>& target_paths,
735  const std::string& name_prefix) const;
737 
738  void setForeignServerProperty(const std::string& server_name,
739  const std::string& property,
740  const std::string& value);
741 
743  const std::string& property,
744  const std::string& value);
745 
747  const TableDescriptorUpdateParams& table_update_params);
748  void alterTableMetadata(const TableDescriptor* td,
749  const TableDescriptorUpdateParams& table_update_params);
750  void setTableFileMgrParams(const int table_id,
751  const File_Namespace::FileMgrParams& file_mgr_params);
753  const UserMetadata& user_metadata,
754  const GetTablesType get_tables_type) const;
755 
758  const std::string& table_name) const;
759 
765  std::unique_ptr<foreign_storage::ForeignServer> foreign_server,
766  bool if_not_exists);
767 
769  const std::string& tableName) const;
770 
771  void removeChunks(const int table_id) const;
772 
774  std::unique_ptr<CustomExpression> getCustomExpressionFromConnector(size_t row);
775 
776  void restoreOldOwners(
777  const std::map<int32_t, std::string>& old_owners_user_name_by_id,
778  const std::map<int32_t, std::vector<DBObject>>& old_owner_db_objects,
779  int32_t new_owner_id);
781  const std::map<int32_t, std::string>& old_owners_user_name_by_id,
782  const std::map<int32_t, std::vector<DBObject>>& old_owner_db_objects,
783  int32_t new_owner_id);
784 
787  void initializeSystemTables();
802 
803  void createSystemTableServer(const std::string& server_name,
804  const std::string& data_wrapper_type,
805  const foreign_storage::OptionsMap& options = {});
806  std::pair<foreign_storage::ForeignTable, std::list<ColumnDescriptor>>
808  const std::string& table_name,
809  const std::string& server_name,
810  const std::vector<std::pair<std::string, SQLTypeInfo>>& column_type_by_name,
811  bool is_in_memory_system_table);
812 
814  const std::list<ColumnDescriptor>& columns);
815 
816  void setDeletedColumnUnlocked(const TableDescriptor* td, const ColumnDescriptor* cd);
817 
820 
822  const TableDescriptor* logical_table,
823  const std::vector<const TableDescriptor*>& physical_tables);
824 
825  std::string dumpCreateTableUnlocked(const TableDescriptor* td,
826  bool multiline_formatting,
827  bool dump_defaults) const;
828 
829  static constexpr const char* CATALOG_SERVER_NAME{"system_catalog_server"};
830  static constexpr const char* MEMORY_STATS_SERVER_NAME{"system_memory_stats_server"};
831  static constexpr const char* STORAGE_STATS_SERVER_NAME{"system_storage_stats_server"};
832  static constexpr const char* LOGS_SERVER_NAME{"system_logs_server"};
833  static constexpr std::array<const char*, 4> INTERNAL_SERVERS{CATALOG_SERVER_NAME,
837 
838  public:
839  mutable std::unique_ptr<heavyai::DistributedSharedMutex> dcatalogMutex_;
840  mutable std::unique_ptr<heavyai::DistributedSharedMutex> dsqliteMutex_;
841  mutable std::mutex sqliteMutex_;
843  mutable std::atomic<std::thread::id> thread_holding_sqlite_lock;
844  mutable std::atomic<std::thread::id> thread_holding_write_lock;
845  // assuming that you never call into a catalog from another catalog via the same thread
846  static thread_local bool thread_holds_read_lock;
847  bool initialized_ = false;
848 };
849 
850 } // namespace Catalog_Namespace
std::string dumpCreateTable(const TableDescriptor *td, bool multiline_formatting=true, bool dump_defaults=false) const
Definition: Catalog.cpp:5131
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:2914
std::unordered_map< const TableDescriptor *, const ColumnDescriptor * > DeletedColumnPerTableMap
Definition: Types.h:48
void instantiateFragmenter(TableDescriptor *td) const
Definition: Catalog.cpp:1834
void removeFromColumnMap(ColumnDescriptor *cd)
Definition: Catalog.cpp:6476
const foreign_storage::ForeignTable * getForeignTable(const std::string &tableName) const
Definition: Catalog.cpp:1883
static constexpr const char * WS_SERVER_ACCESS_LOGS_SYS_TABLE_NAME
Definition: Catalog.h:117
void initializePermissionsSystemTable()
Definition: Catalog.cpp:6095
void deleteMetadataForDashboards(const std::vector< int32_t > ids, const UserMetadata &user)
Definition: Catalog.cpp:2067
TableDictColumnsMap dict_columns_by_table_id_
Definition: Catalog.h:684
void executeDropTableSqliteQueries(const TableDescriptor *td)
Definition: Catalog.cpp:4049
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:6376
static constexpr const char * SERVER_LOGS_SYS_TABLE_NAME
Definition: Catalog.h:114
void eraseTablePhysicalData(const TableDescriptor *td)
Definition: Catalog.cpp:4799
void conditionallyInitializeSystemObjects()
Definition: Catalog.cpp:5946
~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:4952
void getDictionary(const ColumnDescriptor &cd, std::map< int, StringDictionary * > &stringDicts)
Definition: Catalog.cpp:2351
heavyai::shared_mutex sharedMutex_
Definition: Catalog.h:842
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:2253
void deleteCustomExpressions(const std::vector< int32_t > &custom_expression_ids, bool do_soft_delete)
Definition: Catalog.cpp:5633
void addReferenceToForeignDict(ColumnDescriptor &referencing_column, Parser::SharedDictionaryDef shared_dict_def, const bool persist_reference)
Definition: Catalog.cpp:3700
const ColumnDescriptor * getDeletedColumn(const TableDescriptor *td) const
Definition: Catalog.cpp:3632
void setDeletedColumn(const TableDescriptor *td, const ColumnDescriptor *cd)
Definition: Catalog.cpp:3675
ColumnDescriptorMap columnDescriptorMap_
Definition: Catalog.h:675
void createTable(TableDescriptor &td, const std::list< ColumnDescriptor > &columns, const std::vector< Parser::SharedDictionaryDef > &shared_dict_defs, bool isLogicalTable)
Definition: Catalog.cpp:2674
void updateFrontendViewAndLinkUsers()
Definition: Catalog.cpp:460
void createForeignServer(std::unique_ptr< foreign_storage::ForeignServer > foreign_server, bool if_not_exists)
Definition: Catalog.cpp:3017
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:5310
std::map< int32_t, std::vector< int32_t >> LogicalToPhysicalTableMapById
Definition: Types.h:36
Data_Namespace::DataMgr & getDataMgr() const
Definition: Catalog.h:243
void reloadCatalogMetadata(const std::map< int32_t, std::string > &user_name_by_user_id)
Definition: Catalog.cpp:1261
void addColumn(const TableDescriptor &td, ColumnDescriptor &cd)
Definition: Catalog.cpp:2379
int32_t createCustomExpression(std::unique_ptr< CustomExpression > custom_expression)
Definition: Catalog.cpp:5508
void roll(const bool forward)
Definition: Catalog.cpp:2474
bool validateNonExistentTableOrView(const std::string &name, const bool if_not_exists)
Definition: Catalog.cpp:5336
void setTableFileMgrParams(const int table_id, const File_Namespace::FileMgrParams &file_mgr_params)
Definition: Catalog.cpp:3529
std::vector< const TableDescriptor * > getAllForeignTablesForRefresh() const
Definition: Catalog.cpp:5347
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:3068
std::list< const TableDescriptor * > getAllTableMetadata() const
Definition: Catalog.cpp:2244
static constexpr const char * DASHBOARDS_SYS_TABLE_NAME
Definition: Catalog.h:106
SqliteConnector sqliteConnector_
Definition: Catalog.h:686
const std::vector< LeafHostInfo > string_dict_hosts_
Definition: Catalog.h:690
const DBMetadata currentDB_
Definition: Catalog.h:687
DictDescriptorMapById dictDescriptorMapByRef_
Definition: Catalog.h:677
void setColumnDictionary(ColumnDescriptor &cd, std::list< DictDescriptor > &dds, const TableDescriptor &td, bool is_logical_table, bool use_temp_dictionary=false)
Definition: Catalog.cpp:3791
Catalog(const std::string &basePath, const DBMetadata &curDB, std::shared_ptr< Data_Namespace::DataMgr > dataMgr, const std::vector< LeafHostInfo > &string_dict_hosts, std::shared_ptr< Calcite > calcite, bool is_new_db)
Constructor - takes basePath to already extant data directory for writing.
Definition: Catalog.cpp:173
std::shared_ptr< Data_Namespace::DataMgr > dataMgr_
Definition: Catalog.h:688
const LinkDescriptor * getMetadataForLink(const std::string &link) const
const std::optional< std::string > getColumnName(int table_id, int column_id) const
Definition: Catalog.cpp:2024
std::vector< DashboardDescriptor > getAllDashboardsMetadataCopy() const
Definition: Catalog.cpp:2273
void dropTableFromJsonUnlocked(const std::string &table_name) const
Definition: Catalog.cpp:2985
void setForReload(const int32_t tableId)
Definition: Catalog.cpp:4929
int32_t getTableEpoch(const int32_t db_id, const int32_t table_id) const
Definition: Catalog.cpp:3313
void deleteTableCatalogMetadata(const TableDescriptor *logical_table, const std::vector< const TableDescriptor * > &physical_tables)
Definition: Catalog.cpp:4015
void replaceDashboard(DashboardDescriptor &vd)
Definition: Catalog.cpp:4456
void initializeServerLogsSystemTables()
Definition: Catalog.cpp:6237
std::string dumpCreateTableUnlocked(const TableDescriptor *td, bool multiline_formatting, bool dump_defaults) const
Definition: Catalog.cpp:5149
std::vector< std::string > getTableDataDirectories(const TableDescriptor *td) const
Definition: Catalog.cpp:4938
void updateCustomExpression(int32_t custom_expression_id, const std::string &expression_json)
Definition: Catalog.cpp:5605
std::string generatePhysicalTableName(const std::string &logicalTableName, const int32_t &shardNumber)
Definition: Catalog.cpp:4817
void dropColumn(const TableDescriptor &td, const ColumnDescriptor &cd)
Definition: Catalog.cpp:2441
void checkDateInDaysColumnMigration()
Definition: Catalog.cpp:915
static constexpr const char * LOGS_SERVER_NAME
Definition: Catalog.h:832
void addFrontendViewToMap(DashboardDescriptor &vd)
Definition: Catalog.cpp:1739
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:3365
std::vector< TableMetadata > getTablesMetadataForUser(const UserMetadata &user_metadata, const GetTablesType get_tables_type, const std::string &filter_table_name) const
Definition: Catalog.cpp:4716
void reloadCatalogMetadataUnlocked(const std::map< int32_t, std::string > &user_name_by_user_id)
Definition: Catalog.cpp:1269
std::unique_ptr< CustomExpression > getCustomExpressionFromConnector(size_t row)
Definition: Catalog.cpp:1582
std::vector< std::pair< int32_t, int32_t > > getAllPersistedTableAndShardIds() const
Definition: Catalog.cpp:4621
TableDescriptor * getMutableMetadataForTableUnlocked(int table_id) const
Definition: Catalog.cpp:1952
const ColumnDescriptor * getShardColumnMetadataForTable(const TableDescriptor *td) const
Definition: Catalog.cpp:4583
void changeForeignServerOwner(const std::string &server_name, const int new_owner_id)
Definition: Catalog.cpp:3120
std::optional< int32_t > getTableId(const std::string &table_name) const
Definition: Catalog.cpp:1934
std::atomic< std::thread::id > thread_holding_sqlite_lock
Definition: Catalog.h:843
void renameColumn(const TableDescriptor *td, const ColumnDescriptor *cd, const std::string &newColumnName)
Definition: Catalog.cpp:4353
DeletedColumnPerTableMap deletedColumnPerTable_
Definition: Catalog.h:729
ColumnDescriptorMapById columnDescriptorMapById_
Definition: Catalog.h:676
DashboardDescriptorMap dashboardDescriptorMap_
Definition: Catalog.h:678
void setForeignServerOptions(const std::string &server_name, const std::string &options)
Definition: Catalog.cpp:3152
std::vector< std::string > getTableNamesForUser(const UserMetadata &user, const GetTablesType get_tables_type) const
Definition: Catalog.cpp:4701
void addTableToMap(const TableDescriptor *td, const std::list< ColumnDescriptor > &columns, const std::list< DictDescriptor > &dicts)
Definition: Catalog.cpp:1598
void getAllColumnMetadataForTableImpl(const TableDescriptor *td, std::list< const ColumnDescriptor * > &colDescs, const bool fetchSystemColumns, const bool fetchVirtualColumns, const bool fetchPhysicalColumns) const
Definition: Catalog.cpp:2198
void resetTableEpochFloor(const int logicalTableId) const
Definition: Catalog.cpp:4772
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:5391
static constexpr const char * REQUEST_LOGS_SYS_TABLE_NAME
Definition: Catalog.h:115
void recordOwnershipOfObjectsInObjectPermissions()
Definition: Catalog.cpp:787
void updateFrontendViewsToDashboards()
Definition: Catalog.cpp:131
bool filterTableByTypeAndUser(const TableDescriptor *td, const UserMetadata &user_metadata, const GetTablesType get_tables_type) const
Definition: Catalog.cpp:4668
const bool checkMetadataForDeletedRecs(const TableDescriptor *td, int column_id) const
Definition: Catalog.cpp:3638
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:5908
std::string quoteIfRequired(const std::string &column_name) const
Definition: Catalog.cpp:5431
void initializeMemorySummarySystemTable()
Definition: Catalog.cpp:6171
std::string name() const
Definition: Catalog.h:315
std::list< const DashboardDescriptor * > getAllDashboardsMetadata() const
Definition: Catalog.cpp:2264
void updateLeaf(const LeafHostInfo &string_dict_host)
void initializeWebServerLogsSystemTables()
Definition: Catalog.cpp:6299
void removeChunks(const int table_id) const
Definition: Catalog.cpp:3977
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:4533
void gatherAdditionalInfo(std::vector< std::string > &additional_info, std::set< std::string > &shared_dict_column_names, const TableDescriptor *td) const
Definition: Catalog.cpp:5442
void buildLogicalToPhysicalMapUnlocked()
Definition: Catalog.cpp:1518
const DBMetadata & getCurrentDB() const
Definition: Catalog.h:242
void addLinkToMap(LinkDescriptor &ld)
Definition: Catalog.cpp:1826
std::shared_ptr< Calcite > getCalciteMgr() const
Definition: Catalog.h:244
static const std::string getForeignTableSchema(bool if_not_exists=false)
Definition: Catalog.cpp:772
void initializeStorageDetailsSystemTable()
Definition: Catalog.cpp:6211
std::map< int, TableDescriptor * > TableDescriptorMapById
Definition: Types.h:35
const ColumnDescriptor * getDeletedColumnIfRowsDeleted(const TableDescriptor *td) const
Definition: Catalog.cpp:3650
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:2308
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:5859
void dropForeignServer(const std::string &server_name)
Definition: Catalog.cpp:3184
void setDeletedColumnUnlocked(const TableDescriptor *td, const ColumnDescriptor *cd)
Definition: Catalog.cpp:3680
void dropTable(const TableDescriptor *td)
Definition: Catalog.cpp:3987
void buildDashboardsMapUnlocked(const std::map< int32_t, std::string > &user_name_by_user_id)
Definition: Catalog.cpp:1473
void initializeRoleAssignmentsSystemTable()
Definition: Catalog.cpp:6162
const ColumnDescriptor * getMetadataForColumn(int tableId, const std::string &colName) const
static const std::string getForeignServerSchema(bool if_not_exists=false)
Definition: Catalog.cpp:765
int getDatabaseId() const
Definition: Catalog.h:298
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:674
int getLogicalTableId(const int physicalTableId) const
Definition: Catalog.cpp:4740
void invalidateCachesForTable(const int table_id)
Definition: Catalog.cpp:3943
const CustomExpression * getCustomExpression(int32_t custom_expression_id) const
Definition: Catalog.cpp:5557
const DictDescriptor * getMetadataForDict(int dict_ref, bool loadDict=true) const
Definition: Catalog.cpp:1960
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:5411
static void expandGeoColumn(const ColumnDescriptor &cd, std::list< ColumnDescriptor > &columns)
Definition: Catalog.cpp:2530
void buildCustomExpressionsMapUnlocked()
Definition: Catalog.cpp:1570
const std::vector< LeafHostInfo > & getStringDictionaryHosts() const
Definition: Catalog.cpp:1996
void checkpointWithAutoRollback(const int logical_table_id) const
Definition: Catalog.cpp:4762
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:4601
void setMaxRows(const int32_t table_id, const int64_t max_rows)
Definition: Catalog.cpp:3491
void createOrUpdateDashboardSystemRole(const std::string &view_meta, const int32_t &user_id, const std::string &dash_role_name)
Definition: Catalog.cpp:1780
const ColumnDescriptor * getMetadataForColumnBySpi(const int tableId, const size_t spi) const
Definition: Catalog.cpp:2057
ForeignServerMapById foreignServerMapById_
Definition: Catalog.h:682
void alterPhysicalTableMetadata(const TableDescriptor *td, const TableDescriptorUpdateParams &table_update_params)
Definition: Catalog.cpp:3414
static constexpr const char * DATABASES_SYS_TABLE_NAME
Definition: Catalog.h:107
ForeignServerMap foreignServerMap_
Definition: Catalog.h:681
void createShardedTable(TableDescriptor &td, const std::list< ColumnDescriptor > &columns, const std::vector< Parser::SharedDictionaryDef > &shared_dict_defs)
Definition: Catalog.cpp:3833
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:5725
std::vector< const CustomExpression * > getCustomExpressionsForUser(const UserMetadata &user) const
Definition: Catalog.cpp:5580
void checkpoint(const int logicalTableId) const
Definition: Catalog.cpp:4754
void createForeignServerNoLocks(std::unique_ptr< foreign_storage::ForeignServer > foreign_server, bool if_not_exists)
Definition: Catalog.cpp:3025
void initializeMemoryDetailsSystemTable()
Definition: Catalog.cpp:6187
static constexpr const char * TABLES_SYS_TABLE_NAME
Definition: Catalog.h:105
std::vector< std::pair< ColumnDescriptor *, ColumnDescriptor * >> ColumnDescriptorsForRoll
Definition: Catalog.h:704
std::shared_ptr< Calcite > calciteMgr_
Definition: Catalog.h:691
static const std::string physicalTableNameTag_
Definition: Catalog.h:695
void addFrontendViewToMapNoLock(DashboardDescriptor &vd)
Definition: Catalog.cpp:1744
void reloadTableMetadata(int table_id)
Definition: Catalog.cpp:1069
void setTableEpoch(const int db_id, const int table_id, const int new_epoch)
Definition: Catalog.cpp:3381
void alterTableMetadata(const TableDescriptor *td, const TableDescriptorUpdateParams &table_update_params)
Definition: Catalog.cpp:3441
std::vector< std::string > getTableDictDirectories(const TableDescriptor *td) const
Definition: Catalog.cpp:4973
void getForeignServersForUser(const rapidjson::Value *filters, const UserMetadata &user, std::vector< const foreign_storage::ForeignServer * > &results)
Definition: Catalog.cpp:3218
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:780
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:2228
static constexpr const char * STORAGE_DETAILS_SYS_TABLE_NAME
Definition: Catalog.h:113
int32_t createDashboard(DashboardDescriptor &vd)
Definition: Catalog.cpp:4392
void removeTableFromMap(const std::string &tableName, const int tableId, const bool is_on_error=false)
Definition: Catalog.cpp:1657
std::map< int32_t, std::set< const ColumnDescriptor * >> TableDictColumnsMap
Definition: Types.h:41
void removeFragmenterForTable(const int table_id) const
Definition: Catalog.cpp:3965
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:5566
void initializeRequestLogsSystemTables()
Definition: Catalog.cpp:6262
static constexpr const char * CATALOG_SERVER_NAME
Definition: Catalog.h:829
const int getColumnIdBySpiUnlocked(const int table_id, const size_t spi) const
Definition: Catalog.cpp:2034
void eraseTableMetadata(const TableDescriptor *td)
Definition: Catalog.cpp:4037
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:3722
void updateCustomExpressionsSchema()
Definition: Catalog.cpp:753
std::set< std::string > getTableDictDirectoryPaths(int32_t table_id) const
Definition: Catalog.cpp:4986
std::unique_ptr< heavyai::DistributedSharedMutex > dsqliteMutex_
Definition: Catalog.h:840
bool isInfoSchemaDb() const
Definition: Catalog.cpp:5953
void setTableEpochs(const int32_t db_id, const std::vector< TableEpochInfo > &table_epochs) const
Definition: Catalog.cpp:3584
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:3466
std::optional< std::string > getTableName(int32_t table_id) const
Definition: Catalog.cpp:1925
void reloadTableMetadataUnlocked(int table_id)
Definition: Catalog.cpp:1076
void updateForeignTablesInMapUnlocked()
Definition: Catalog.cpp:4844
std::string createLink(LinkDescriptor &ld, size_t min_length)
Definition: Catalog.cpp:4545
Descriptor for a dictionary for a string columne.
void updateLogicalToPhysicalTableLinkSchema()
Definition: Catalog.cpp:621
void setUncappedTableEpoch(const std::string &table_name)
Definition: Catalog.cpp:3510
CustomExpressionMapById custom_expr_map_by_id_
Definition: Catalog.h:683
std::atomic< std::thread::id > thread_holding_write_lock
Definition: Catalog.h:844
static constexpr std::array< const char *, 4 > INTERNAL_SERVERS
Definition: Catalog.h:833
foreign_storage::ForeignTable * getForeignTableUnlocked(const std::string &tableName) const
Definition: Catalog.cpp:1874
void setForeignServerDataWrapper(const std::string &server_name, const std::string &data_wrapper)
Definition: Catalog.cpp:3131
std::unique_ptr< heavyai::DistributedSharedMutex > dcatalogMutex_
Definition: Catalog.h:839
void setTableEpochsLogExceptions(const int32_t db_id, const std::vector< TableEpochInfo > &table_epochs) const
Definition: Catalog.cpp:3620
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:299
const std::string & getCatalogBasePath() const
Definition: Catalog.h:245
DictRef addDictionary(ColumnDescriptor &cd)
Definition: Catalog.cpp:2283
std::shared_timed_mutex shared_mutex
const std::unique_ptr< const foreign_storage::ForeignTable > getForeignTableFromStorage(int table_id)
Definition: Catalog.cpp:3100
void renameTable(const TableDescriptor *td, const std::string &newTableName)
LinkDescriptorMapById linkDescriptorMapById_
Definition: Catalog.h:680
std::string dumpSchema(const TableDescriptor *td) const
Definition: Catalog.cpp:5004
void updateForeignTableRefreshTimes(const int32_t table_id)
Definition: Catalog.cpp:5369
ColumnDescriptorsForRoll columnDescriptorsForRoll
Definition: Catalog.h:705
static constexpr const char * MEMORY_STATS_SERVER_NAME
Definition: Catalog.h:830
bool recreateSystemTableIfUpdated(foreign_storage::ForeignTable &foreign_table, const std::list< ColumnDescriptor > &columns)
Definition: Catalog.cpp:6414
void doTruncateTable(const TableDescriptor *td)
Definition: Catalog.cpp:3877
void createSystemTableServer(const std::string &server_name, const std::string &data_wrapper_type, const foreign_storage::OptionsMap &options={})
Definition: Catalog.cpp:6349
const std::map< int, const ColumnDescriptor * > getDictionaryToColumnMapping()
Definition: Catalog.cpp:4637
void renamePhysicalTable(const TableDescriptor *td, const std::string &newTableName)
void renameForeignServer(const std::string &server_name, const std::string &name)
Definition: Catalog.cpp:3172
std::vector< DBObject > parseDashboardObjects(const std::string &view_meta, const int &user_id)
Definition: Catalog.cpp:1750
static constexpr const char * WS_SERVER_LOGS_SYS_TABLE_NAME
Definition: Catalog.h:116
void addToColumnMap(ColumnDescriptor *cd)
Definition: Catalog.cpp:6468
const std::unique_ptr< const foreign_storage::ForeignServer > getForeignServerFromStorage(const std::string &server_name)
Definition: Catalog.cpp:3080
static constexpr const char * STORAGE_STATS_SERVER_NAME
Definition: Catalog.h:831
LogicalToPhysicalTableMapById logicalToPhysicalTableMapById_
Definition: Catalog.h:693
TableDescriptorMap tableDescriptorMap_
Definition: Catalog.h:673
void setForeignServerProperty(const std::string &server_name, const std::string &property, const std::string &value)
Definition: Catalog.cpp:4874
static thread_local bool thread_holds_read_lock
Definition: Catalog.h:846
std::map< std::string, TableDescriptor * > TableDescriptorMap
Definition: Types.h:34
void initializeDashboardsSystemTable()
Definition: Catalog.cpp:6146
LinkDescriptorMap linkDescriptorMap_
Definition: Catalog.h:679
void CheckAndExecuteMigrationsPostBuildMaps()
Definition: Catalog.cpp:1021
std::vector< TableEpochInfo > getTableEpochs(const int32_t db_id, const int32_t table_id) const
Definition: Catalog.cpp:3556
const int getColumnIdBySpi(const int tableId, const size_t spi) const
Definition: Catalog.cpp:2052
void createDefaultServersIfNotExists()
Definition: Catalog.cpp:4895
void truncateTable(const TableDescriptor *td)
Definition: Catalog.cpp:3869
void initializeWebServerAccessLogsSystemTables()
Definition: Catalog.cpp:6322
void updateLogicalToPhysicalTableMap(const int32_t logical_tb_id)
Definition: Catalog.cpp:635