@@ -369,13 +369,13 @@ ResultType Catalog::CreateTable(const std::string &database_name,
369
369
// Update pg_table with table info
370
370
pg_table->InsertTable (table_oid, table_name, schema_name,
371
371
database_object->GetDatabaseOid (),
372
- table->GetDefaultLayout ()->GetOid (), pool_.get (), txn);
372
+ table->GetDefaultLayout ()->GetOid (), pool_.get (), txn);
373
373
oid_t column_id = 0 ;
374
374
for (const auto &column : table->GetSchema ()->GetColumns ()) {
375
375
pg_attribute->InsertColumn (table_oid, column.GetName (), column_id,
376
376
column.GetOffset (), column.GetType (),
377
377
column.GetLength (), column.IsInlined (),
378
- column.GetConstraints (), pool_.get (), txn);
378
+ column.GetConstraints (), pool_.get (), txn);
379
379
380
380
// Create index on unique single column
381
381
if (column.IsUnique ()) {
@@ -393,11 +393,11 @@ ResultType Catalog::CreateTable(const std::string &database_name,
393
393
394
394
// Create layout as default layout
395
395
auto pg_layout =
396
- catalog_map_[database_object->GetDatabaseOid ()]->GetLayoutCatalog ();
396
+ catalog_map_[database_object->GetDatabaseOid ()]->GetLayoutCatalog ();
397
397
auto default_layout = table->GetDefaultLayout ();
398
398
if (!pg_layout->InsertLayout (table_oid, default_layout, pool_.get (), txn))
399
399
throw CatalogException (" Failed to create a new layout for table "
400
- + table_name);
400
+ + table_name);
401
401
402
402
return ResultType::SUCCESS;
403
403
}
@@ -594,10 +594,10 @@ std::shared_ptr<const storage::Layout> Catalog::CreateLayout(
594
594
// Add the layout the pg_layout table
595
595
auto pg_layout = catalog_map_[database_oid]->GetLayoutCatalog ();
596
596
if (pg_layout->GetLayoutWithOid (table_oid, new_layout->GetOid (), txn)
597
- == nullptr &&
598
- !pg_layout->InsertLayout (table_oid, new_layout, pool_.get (), txn)) {
599
- LOG_ERROR (" Failed to create a new layout for table %u" , table_oid);
600
- return nullptr ;
597
+ == nullptr &&
598
+ !pg_layout->InsertLayout (table_oid, new_layout, pool_.get (), txn)) {
599
+ LOG_ERROR (" Failed to create a new layout for table %u" , table_oid);
600
+ return nullptr ;
601
601
}
602
602
return new_layout;
603
603
}
@@ -615,7 +615,7 @@ std::shared_ptr<const storage::Layout> Catalog::CreateDefaultLayout(
615
615
616
616
// update table catalog
617
617
catalog_map_[database_oid]->GetTableCatalog ()
618
- ->UpdateDefaultLayoutOid (new_layout->GetOid (), table_oid, txn);
618
+ ->UpdateDefaultLayoutOid (new_layout->GetOid (), table_oid, txn);
619
619
}
620
620
return new_layout;
621
621
}
@@ -853,16 +853,16 @@ ResultType Catalog::DropLayout(oid_t database_oid, oid_t table_oid,
853
853
table->ResetDefaultLayout ();
854
854
auto new_default_layout = table->GetDefaultLayout ();
855
855
if (pg_layout->GetLayoutWithOid (table_oid, new_default_layout->GetOid (),
856
- txn) == nullptr &&
857
- !pg_layout->InsertLayout (table_oid, new_default_layout,
858
- pool_.get (), txn)) {
856
+ txn) == nullptr &&
857
+ !pg_layout->InsertLayout (table_oid, new_default_layout,
858
+ pool_.get (), txn)) {
859
859
LOG_DEBUG (" Failed to create a new layout for table %d" , table_oid);
860
860
return ResultType::FAILURE;
861
861
}
862
862
863
863
// update table catalog
864
864
catalog_map_[database_oid]->GetTableCatalog ()
865
- ->UpdateDefaultLayoutOid (new_default_layout->GetOid (), table_oid, txn);
865
+ ->UpdateDefaultLayoutOid (new_default_layout->GetOid (), table_oid, txn);
866
866
}
867
867
868
868
return ResultType::SUCCESS;
0 commit comments