OmniSciDB  1dac507f6e
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Go to the documentation of this file.
1 /*
2  * Copyright 2017 MapD Technologies, 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  *
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  */
29 #ifndef CATALOG_H
30 #define CATALOG_H
32 #include <atomic>
33 #include <cstdint>
34 #include <ctime>
35 #include <limits>
36 #include <list>
37 #include <map>
38 #include <mutex>
39 #include <string>
40 #include <utility>
41 #include <vector>
43 #include "ColumnDescriptor.h"
44 #include "DashboardDescriptor.h"
45 #include "DictDescriptor.h"
46 #include "LinkDescriptor.h"
47 #include "TableDescriptor.h"
49 #include "../DataMgr/DataMgr.h"
50 #include "../QueryEngine/CompilationOptions.h"
51 #include "../SqliteConnector/SqliteConnector.h"
52 #include "LeafHostInfo.h"
54 #include "../Calcite/Calcite.h"
55 #include "../Shared/mapd_shared_mutex.h"
57 #include "SessionInfo.h"
58 #include "SysCatalog.h"
60 namespace Parser {
64 } // namespace Parser
66 // SPI means Sequential Positional Index which is equivalent to the input index in a
67 // RexInput node
68 #define SPIMAP_MAGIC1 (std::numeric_limits<unsigned>::max() / 4)
69 #define SPIMAP_MAGIC2 8
70 #define SPIMAP_GEO_PHYSICAL_INPUT(c, i) \
71  (SPIMAP_MAGIC1 + (unsigned)(SPIMAP_MAGIC2 * ((c) + 1) + (i)))
73 namespace Catalog_Namespace {
81 class Catalog final {
82  public:
91  Catalog(const std::string& basePath,
92  const DBMetadata& curDB,
93  std::shared_ptr<Data_Namespace::DataMgr> dataMgr,
94  const std::vector<LeafHostInfo>& string_dict_hosts,
95  std::shared_ptr<Calcite> calcite,
96  bool is_new_db);
104  ~Catalog();
106  static void expandGeoColumn(const ColumnDescriptor& cd,
107  std::list<ColumnDescriptor>& columns);
108  void createTable(TableDescriptor& td,
109  const std::list<ColumnDescriptor>& columns,
110  const std::vector<Parser::SharedDictionaryDef>& shared_dict_defs,
111  bool isLogicalTable);
112  void createShardedTable(
113  TableDescriptor& td,
114  const std::list<ColumnDescriptor>& columns,
115  const std::vector<Parser::SharedDictionaryDef>& shared_dict_defs);
118  std::string createLink(LinkDescriptor& ld, size_t min_length);
119  void dropTable(const TableDescriptor* td);
120  void truncateTable(const TableDescriptor* td);
121  void renameTable(const TableDescriptor* td, const std::string& newTableName);
122  void renameColumn(const TableDescriptor* td,
123  const ColumnDescriptor* cd,
124  const std::string& newColumnName);
125  void addColumn(const TableDescriptor& td, ColumnDescriptor& cd);
126  void removeChunks(const int table_id);
136  const TableDescriptor* getMetadataForTable(const std::string& tableName,
137  const bool populateFragmenter = true) const;
138  const TableDescriptor* getMetadataForTableImpl(int tableId,
139  const bool populateFragmenter) const;
140  const TableDescriptor* getMetadataForTable(int tableId) const;
142  const ColumnDescriptor* getMetadataForColumn(int tableId,
143  const std::string& colName) const;
144  const ColumnDescriptor* getMetadataForColumn(int tableId, int columnId) const;
146  const int getColumnIdBySpi(const int tableId, const size_t spi) const;
147  const ColumnDescriptor* getMetadataForColumnBySpi(const int tableId,
148  const size_t spi) const;
150  const DashboardDescriptor* getMetadataForDashboard(const std::string& userId,
151  const std::string& dashName) const;
152  void deleteMetadataForDashboard(const std::string& userId, const std::string& dashName);
154  const DashboardDescriptor* getMetadataForDashboard(const int32_t dashboard_id) const;
155  void deleteMetadataForDashboard(const int32_t dashboard_id);
157  const LinkDescriptor* getMetadataForLink(const std::string& link) const;
158  const LinkDescriptor* getMetadataForLink(int linkId) const;
168  std::list<const ColumnDescriptor*> getAllColumnMetadataForTable(
169  const int tableId,
170  const bool fetchSystemColumns,
171  const bool fetchVirtualColumns,
172  const bool fetchPhysicalColumns) const;
174  std::list<const TableDescriptor*> getAllTableMetadata() const;
175  std::list<const DashboardDescriptor*> getAllDashboardsMetadata() const;
176  const DBMetadata& getCurrentDB() const { return currentDB_; }
178  std::shared_ptr<Calcite> getCalciteMgr() const { return calciteMgr_; }
179  const std::string& getBasePath() const { return basePath_; }
181  const DictDescriptor* getMetadataForDict(int dict_ref, bool loadDict = true) const;
183  const std::vector<LeafHostInfo>& getStringDictionaryHosts() const;
187  std::vector<const TableDescriptor*> getPhysicalTablesDescriptors(
188  const TableDescriptor* logicalTableDesc) const;
190  int32_t getTableEpoch(const int32_t db_id, const int32_t table_id) const;
191  void setTableEpoch(const int db_id, const int table_id, const int new_epoch);
192  int getDatabaseId() const { return currentDB_.dbId; }
195  void roll(const bool forward);
197  void delDictionary(const ColumnDescriptor& cd);
198  void getDictionary(const ColumnDescriptor& cd,
199  std::map<int, StringDictionary*>& stringDicts);
201  static void set(const std::string& dbName, std::shared_ptr<Catalog> cat);
202  static std::shared_ptr<Catalog> get(const std::string& dbName);
203  static std::shared_ptr<Catalog> get(const std::string& basePath,
204  const DBMetadata& curDB,
205  std::shared_ptr<Data_Namespace::DataMgr> dataMgr,
206  const std::vector<LeafHostInfo>& string_dict_hosts,
207  std::shared_ptr<Calcite> calcite,
208  bool is_new_db);
209  static void remove(const std::string& dbName);
211  const bool checkMetadataForDeletedRecs(int dbId, int tableId, int columnId) const;
212  const ColumnDescriptor* getDeletedColumn(const TableDescriptor* td) const;
215  void setDeletedColumn(const TableDescriptor* td, const ColumnDescriptor* cd);
216  void setDeletedColumnUnlocked(const TableDescriptor* td, const ColumnDescriptor* cd);
217  int getLogicalTableId(const int physicalTableId) const;
218  void checkpoint(const int logicalTableId) const;
219  std::string name() const { return getCurrentDB().dbName; }
220  void eraseDBData();
221  void eraseTablePhysicalData(const TableDescriptor* td);
222  void vacuumDeletedRows(const TableDescriptor* td) const;
223  void vacuumDeletedRows(const int logicalTableId) const;
225  // dump & restore
226  void dumpTable(const TableDescriptor* td,
227  const std::string& path,
228  const std::string& compression) const;
229  void restoreTable(const SessionInfo& session,
230  const TableDescriptor* td,
231  const std::string& file_path,
232  const std::string& compression);
233  void restoreTable(const SessionInfo& session,
234  const std::string& table_name,
235  const std::string& file_path,
236  const std::string& compression);
237  std::vector<std::string> getTableDataDirectories(const TableDescriptor* td) const;
238  std::vector<std::string> getTableDictDirectories(const TableDescriptor* td) const;
239  std::string getColumnDictDirectory(const ColumnDescriptor* cd) const;
240  std::string dumpSchema(const TableDescriptor* td) const;
242  protected:
243  typedef std::map<std::string, TableDescriptor*> TableDescriptorMap;
244  typedef std::map<int, TableDescriptor*> TableDescriptorMapById;
245  typedef std::map<int32_t, std::vector<int32_t>> LogicalToPhysicalTableMapById;
246  typedef std::tuple<int, std::string> ColumnKey;
247  typedef std::map<ColumnKey, ColumnDescriptor*> ColumnDescriptorMap;
248  typedef std::tuple<int, int> ColumnIdKey;
249  typedef std::map<ColumnIdKey, ColumnDescriptor*> ColumnDescriptorMapById;
250  typedef std::map<DictRef, std::unique_ptr<DictDescriptor>> DictDescriptorMapById;
251  typedef std::map<std::string, std::shared_ptr<DashboardDescriptor>>
253  typedef std::map<std::string, LinkDescriptor*> LinkDescriptorMap;
254  typedef std::map<int, LinkDescriptor*> LinkDescriptorMapById;
255  typedef std::unordered_map<const TableDescriptor*, const ColumnDescriptor*>
260  void updateDictionaryNames();
264  void updateLinkSchema();
267  void updateLogicalToPhysicalTableMap(const int32_t logical_tb_id);
268  void updateDictionarySchema();
269  void updatePageSize();
275  void buildMaps();
277  const std::list<ColumnDescriptor>& columns,
278  const std::list<DictDescriptor>& dicts);
279  void addReferenceToForeignDict(ColumnDescriptor& referencing_column,
280  Parser::SharedDictionaryDef shared_dict_def);
282  ColumnDescriptor& cd,
283  std::list<ColumnDescriptor>& cdd,
284  std::list<DictDescriptor>& dds,
285  const TableDescriptor td,
286  const std::vector<Parser::SharedDictionaryDef>& shared_dict_defs);
288  std::list<DictDescriptor>& dds,
289  const TableDescriptor& td,
290  const bool isLogicalTable);
293  void addLinkToMap(LinkDescriptor& ld);
294  void removeTableFromMap(const std::string& tableName,
295  const int tableId,
296  const bool is_on_error = false);
297  void doDropTable(const TableDescriptor* td);
298  void doTruncateTable(const TableDescriptor* td);
299  void renamePhysicalTable(const TableDescriptor* td, const std::string& newTableName);
300  void instantiateFragmenter(TableDescriptor* td) const;
302  std::list<const ColumnDescriptor*>& colDescs,
303  const bool fetchSystemColumns,
304  const bool fetchVirtualColumns,
305  const bool fetchPhysicalColumns) const;
306  std::string calculateSHA1(const std::string& data);
307  std::string generatePhysicalTableName(const std::string& logicalTableName,
308  const int32_t& shardNumber);
309  std::vector<DBObject> parseDashboardObjects(const std::string& view_meta,
310  const int& user_id);
311  void createOrUpdateDashboardSystemRole(const std::string& view_meta,
312  const int32_t& user_id,
313  const std::string& dash_role_name);
315  const int getColumnIdBySpiUnlocked(const int table_id, const size_t spi) const;
317  std::string basePath_;
328  std::shared_ptr<Data_Namespace::DataMgr> dataMgr_;
330  const std::vector<LeafHostInfo> string_dict_hosts_;
331  std::shared_ptr<Calcite> calciteMgr_;
334  static const std::string
335  physicalTableNameTag_; // extra component added to the name of each physical table
339  // this tuple is for rolling forw/back once after ALTER ADD/DEL/MODIFY columns
340  // succeeds/fails
341  // get(0) = old ColumnDescriptor*
342  // get(1) = new ColumnDescriptor*
344  std::vector<std::pair<ColumnDescriptor*, ColumnDescriptor*>>;
347  private:
348  static std::map<std::string, std::shared_ptr<Catalog>> mapd_cat_map_;
351  const std::string& temp_data_dir,
352  const std::unordered_map<int, int>& all_column_ids_map) const;
353  void renameTableDirectories(const std::string& temp_data_dir,
354  const std::vector<std::string>& target_paths,
355  const std::string& name_prefix) const;
357  public:
358  mutable std::mutex sqliteMutex_;
360  mutable std::atomic<std::thread::id> thread_holding_sqlite_lock;
361  mutable std::atomic<std::thread::id> thread_holding_write_lock;
362  // assuming that you never call into a catalog from another catalog via the same thread
363  static thread_local bool thread_holds_read_lock;
364 };
366 } // namespace Catalog_Namespace
368 #endif // CATALOG_H
void instantiateFragmenter(TableDescriptor *td) const
Definition: Catalog.cpp:1273
void renameTableDirectories(const std::string &temp_data_dir, const std::vector< std::string > &target_paths, const std::string &name_prefix) const
void eraseTablePhysicalData(const TableDescriptor *td)
Definition: Catalog.cpp:2949
void doDropTable(const TableDescriptor *td)
Definition: Catalog.cpp:2560
Destructor - deletes all ColumnDescriptor and TableDescriptor structures which were allocated on the ...
Definition: Catalog.cpp:156
void getDictionary(const ColumnDescriptor &cd, std::map< int, StringDictionary * > &stringDicts)
Definition: Catalog.cpp:1674
mapd_shared_mutex sharedMutex_
Definition: Catalog.h:359
class for a per-database catalog. also includes metadata for the current database and the current use...
Definition: Catalog.h:81
const ColumnDescriptor * getDeletedColumn(const TableDescriptor *td) const
Definition: Catalog.cpp:2179
void setDeletedColumn(const TableDescriptor *td, const ColumnDescriptor *cd)
Definition: Catalog.cpp:2238
ColumnDescriptorMap columnDescriptorMap_
Definition: Catalog.h:320
void createTable(TableDescriptor &td, const std::list< ColumnDescriptor > &columns, const std::vector< Parser::SharedDictionaryDef > &shared_dict_defs, bool isLogicalTable)
Definition: Catalog.cpp:1939
void updateFrontendViewAndLinkUsers()
Definition: Catalog.cpp:327
Data_Namespace::DataMgr & getDataMgr() const
Definition: Catalog.h:177
void addColumn(const TableDescriptor &td, ColumnDescriptor &cd)
Definition: Catalog.cpp:1702
void roll(const bool forward)
Definition: Catalog.cpp:1752
std::map< ColumnKey, ColumnDescriptor * > ColumnDescriptorMap
Definition: Catalog.h:247
std::map< std::string, TableDescriptor * > TableDescriptorMap
Definition: Catalog.h:243
std::list< const TableDescriptor * > getAllTableMetadata() const
Definition: Catalog.cpp:1598
std::unordered_map< const TableDescriptor *, const ColumnDescriptor * > DeletedColumnPerTableMap
Definition: Catalog.h:256
std::map< int32_t, std::vector< int32_t > > LogicalToPhysicalTableMapById
Definition: Catalog.h:245
SqliteConnector sqliteConnector_
Definition: Catalog.h:326
const std::vector< LeafHostInfo > string_dict_hosts_
Definition: Catalog.h:330
std::vector< const TableDescriptor * > getPhysicalTablesDescriptors(const TableDescriptor *logicalTableDesc) const
Definition: Catalog.cpp:2897
DictDescriptorMapById dictDescriptorMapByRef_
Definition: Catalog.h:322
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:129
std::shared_ptr< Data_Namespace::DataMgr > dataMgr_
Definition: Catalog.h:328
const LinkDescriptor * getMetadataForLink(const std::string &link) const
int32_t getTableEpoch(const int32_t db_id, const int32_t table_id) const
Definition: Catalog.cpp:2125
void replaceDashboard(DashboardDescriptor &vd)
Definition: Catalog.cpp:2758
std::vector< std::string > getTableDataDirectories(const TableDescriptor *td) const
std::string generatePhysicalTableName(const std::string &logicalTableName, const int32_t &shardNumber)
Definition: Catalog.cpp:2979
void addTableToMap(TableDescriptor &td, const std::list< ColumnDescriptor > &columns, const std::list< DictDescriptor > &dicts)
Definition: Catalog.cpp:1051
void checkDateInDaysColumnMigration()
Definition: Catalog.cpp:655
void addFrontendViewToMap(DashboardDescriptor &vd)
Definition: Catalog.cpp:1183
void deleteMetadataForDashboard(const std::string &userId, const std::string &dashName)
Definition: Catalog.cpp:1447
const ColumnDescriptor * getShardColumnMetadataForTable(const TableDescriptor *td) const
Definition: Catalog.cpp:2881
std::atomic< std::thread::id > thread_holding_sqlite_lock
Definition: Catalog.h:360
void renameColumn(const TableDescriptor *td, const ColumnDescriptor *cd, const std::string &newColumnName)
Definition: Catalog.cpp:2657
DeletedColumnPerTableMap deletedColumnPerTable_
Definition: Catalog.h:349
ColumnDescriptorMapById columnDescriptorMapById_
Definition: Catalog.h:321
DashboardDescriptorMap dashboardDescriptorMap_
Definition: Catalog.h:323
void recordOwnershipOfObjectsInObjectPermissions()
Definition: Catalog.cpp:528
void updateFrontendViewsToDashboards()
Definition: Catalog.cpp:98
std::map< std::string, LinkDescriptor * > LinkDescriptorMap
Definition: Catalog.h:253
std::string getColumnDictDirectory(const ColumnDescriptor *cd) const
std::string name() const
Definition: Catalog.h:219
std::list< const DashboardDescriptor * > getAllDashboardsMetadata() const
Definition: Catalog.cpp:1607
void dumpTable(const TableDescriptor *td, const std::string &path, const std::string &compression) const
std::map< int, LinkDescriptor * > LinkDescriptorMapById
Definition: Catalog.h:254
This file contains the class specification and related data structures for SysCatalog.
std::string calculateSHA1(const std::string &data)
Definition: Catalog.cpp:2830
const DBMetadata & getCurrentDB() const
Definition: Catalog.h:176
void addLinkToMap(LinkDescriptor &ld)
Definition: Catalog.cpp:1265
std::shared_ptr< Calcite > getCalciteMgr() const
Definition: Catalog.h:178
std::map< DictRef, std::unique_ptr< DictDescriptor > > DictDescriptorMapById
Definition: Catalog.h:250
const ColumnDescriptor * getDeletedColumnIfRowsDeleted(const TableDescriptor *td) const
Definition: Catalog.cpp:2204
void adjustAlteredTableFiles(const std::string &temp_data_dir, const std::unordered_map< int, int > &all_column_ids_map) const
void delDictionary(const ColumnDescriptor &cd)
Definition: Catalog.cpp:1641
std::shared_timed_mutex mapd_shared_mutex
void removeChunks(const int table_id)
Definition: Catalog.cpp:2508
std::map< int, TableDescriptor * > TableDescriptorMapById
Definition: Catalog.h:244
void setDeletedColumnUnlocked(const TableDescriptor *td, const ColumnDescriptor *cd)
Definition: Catalog.cpp:2243
void dropTable(const TableDescriptor *td)
Definition: Catalog.cpp:2527
std::tuple< int, int > ColumnIdKey
Definition: Catalog.h:248
const bool checkMetadataForDeletedRecs(int dbId, int tableId, int columnId) const
Definition: Catalog.cpp:2185
const ColumnDescriptor * getMetadataForColumn(int tableId, const std::string &colName) const
const std::string & getBasePath() const
Definition: Catalog.h:179
std::tuple< int, std::string > ColumnKey
Definition: Catalog.h:246
int getDatabaseId() const
Definition: Catalog.h:192
const DashboardDescriptor * getMetadataForDashboard(const std::string &userId, const std::string &dashName) const
TableDescriptorMapById tableDescriptorMapById_
Definition: Catalog.h:319
int getLogicalTableId(const int physicalTableId) const
Definition: Catalog.cpp:2916
const DictDescriptor * getMetadataForDict(int dict_ref, bool loadDict=true) const
Definition: Catalog.cpp:1350
specifies the content in-memory of a row in the column metadata table
void restoreTable(const SessionInfo &session, const TableDescriptor *td, const std::string &file_path, const std::string &compression)
static void expandGeoColumn(const ColumnDescriptor &cd, std::list< ColumnDescriptor > &columns)
Definition: Catalog.cpp:1809
const std::vector< LeafHostInfo > & getStringDictionaryHosts() const
Definition: Catalog.cpp:1386
void createOrUpdateDashboardSystemRole(const std::string &view_meta, const int32_t &user_id, const std::string &dash_role_name)
Definition: Catalog.cpp:1224
const ColumnDescriptor * getMetadataForColumnBySpi(const int tableId, const size_t spi) const
Definition: Catalog.cpp:1437
void createShardedTable(TableDescriptor &td, const std::list< ColumnDescriptor > &columns, const std::vector< Parser::SharedDictionaryDef > &shared_dict_defs)
Definition: Catalog.cpp:2386
std::map< ColumnIdKey, ColumnDescriptor * > ColumnDescriptorMapById
Definition: Catalog.h:249
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:1581
void checkpoint(const int logicalTableId) const
Definition: Catalog.cpp:2929
std::vector< std::pair< ColumnDescriptor *, ColumnDescriptor * >> ColumnDescriptorsForRoll
Definition: Catalog.h:344
std::shared_ptr< Calcite > calciteMgr_
Definition: Catalog.h:331
static const std::string physicalTableNameTag_
Definition: Catalog.h:335
void addFrontendViewToMapNoLock(DashboardDescriptor &vd)
Definition: Catalog.cpp:1188
void setTableEpoch(const int db_id, const int table_id, const int new_epoch)
Definition: Catalog.cpp:2155
static void set(const std::string &dbName, std::shared_ptr< Catalog > cat)
Definition: Catalog.cpp:2986
std::vector< std::string > getTableDictDirectories(const TableDescriptor *td) const
void vacuumDeletedRows(const TableDescriptor *td) const
Definition: Catalog.cpp:3030
int32_t createDashboard(DashboardDescriptor &vd)
Definition: Catalog.cpp:2696
void removeTableFromMap(const std::string &tableName, const int tableId, const bool is_on_error=false)
Definition: Catalog.cpp:1101
void addReferenceToForeignDict(ColumnDescriptor &referencing_column, Parser::SharedDictionaryDef shared_dict_def)
Definition: Catalog.cpp:2264
const int getColumnIdBySpiUnlocked(const int table_id, const size_t spi) const
Definition: Catalog.cpp:1415
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:2283
const TableDescriptor * getMetadataForTableImpl(int tableId, const bool populateFragmenter) const
Definition: Catalog.cpp:1330
std::string createLink(LinkDescriptor &ld, size_t min_length)
Definition: Catalog.cpp:2842
Descriptor for a dictionary for a string columne.
void updateLogicalToPhysicalTableLinkSchema()
Definition: Catalog.cpp:467
std::atomic< std::thread::id > thread_holding_write_lock
Definition: Catalog.h:361
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:194
DictRef addDictionary(ColumnDescriptor &cd)
Definition: Catalog.cpp:1615
specifies the content in-memory of a row in the table metadata table
void renameTable(const TableDescriptor *td, const std::string &newTableName)
Definition: Catalog.cpp:2617
LinkDescriptorMapById linkDescriptorMapById_
Definition: Catalog.h:325
static std::map< std::string, std::shared_ptr< Catalog > > mapd_cat_map_
Definition: Catalog.h:348
std::string dumpSchema(const TableDescriptor *td) const
void setColumnDictionary(ColumnDescriptor &cd, std::list< DictDescriptor > &dds, const TableDescriptor &td, const bool isLogicalTable)
Definition: Catalog.cpp:2345
ColumnDescriptorsForRoll columnDescriptorsForRoll
Definition: Catalog.h:345
void doTruncateTable(const TableDescriptor *td)
Definition: Catalog.cpp:2438
std::map< std::string, std::shared_ptr< DashboardDescriptor > > DashboardDescriptorMap
Definition: Catalog.h:252
void renamePhysicalTable(const TableDescriptor *td, const std::string &newTableName)
Definition: Catalog.cpp:2591
std::vector< DBObject > parseDashboardObjects(const std::string &view_meta, const int &user_id)
Definition: Catalog.cpp:1194
LogicalToPhysicalTableMapById logicalToPhysicalTableMapById_
Definition: Catalog.h:333
TableDescriptorMap tableDescriptorMap_
Definition: Catalog.h:318
static thread_local bool thread_holds_read_lock
Definition: Catalog.h:363
LinkDescriptorMap linkDescriptorMap_
Definition: Catalog.h:324
void CheckAndExecuteMigrationsPostBuildMaps()
Definition: Catalog.cpp:849
const int getColumnIdBySpi(const int tableId, const size_t spi) const
Definition: Catalog.cpp:1432
void truncateTable(const TableDescriptor *td)
Definition: Catalog.cpp:2420
void updateLogicalToPhysicalTableMap(const int32_t logical_tb_id)
Definition: Catalog.cpp:481