390189 {
390190
390191 auto create_info = deserializer.ReadProperty<unique_ptr<CreateInfo>>(100, "index");
390192 auto &info = create_info->Cast<CreateIndexInfo>();
390193
390194
390195
390196 auto root_block_pointer =
390197 deserializer.ReadPropertyWithExplicitDefault<BlockPointer>(101, "root_block_pointer", BlockPointer());
390198
390199
390200
390201
390202 auto &schema = catalog.GetSchema(transaction, create_info->schema);
390203 auto catalog_table = schema.GetEntry(transaction, CatalogType::TABLE_ENTRY, info.table);
390204 if (!catalog_table) {
390205
390206 throw IOException("corrupt database file - index entry without table entry");
390207 }
390208 auto &table = catalog_table->Cast<DuckTableEntry>();
390209
390210
390211
390212
390213 if (info.index_type.empty()) {
390215 }
390216
390217
390218 auto &
index = schema.CreateIndex(transaction, info, table)->Cast<DuckIndexEntry>();
390219 auto &data_table = table.GetStorage();
390220 auto &table_info = data_table.GetDataTableInfo();
390221
390222 IndexStorageInfo index_storage_info;
390223 if (root_block_pointer.IsValid()) {
390224
390225 index_storage_info.name =
index.name;
390226 index_storage_info.root_block_ptr = root_block_pointer;
390227 } else {
390228
390229 index_storage_info = table_info->ExtractIndexStorageInfo(
index.name);
390230 }
390231
390232 D_ASSERT(index_storage_info.IsValid());
390233 D_ASSERT(!index_storage_info.name.empty());
390234
390235
390236 auto unbound_index = make_uniq<UnboundIndex>(std::move(create_info), std::move(index_storage_info),
390238 table_info->GetIndexes().AddIndex(std::move(unbound_index));
390239}
static constexpr const char * TYPE_NAME
Index type name for the ART.
Definition duckdb.cpp:12136
static TableIOManager & Get(DataTable &table)
Obtains a reference to the TableIOManager of a specific table.
Definition duckdb.cpp:411568