Skip to content

Commit

Permalink
Implement GetUniqueConstraintKeys
Browse files Browse the repository at this point in the history
  • Loading branch information
Mytherin committed Apr 19, 2024
1 parent 044ec9e commit 4f7b3de
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/catalog/catalog_entry/duck_table_entry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,15 @@ IndexStorageInfo GetIndexInfo(const IndexConstraintType &constraint_type, unique
}

vector<PhysicalIndex> GetUniqueConstraintKeys(const ColumnList &columns, const UniqueConstraint &constraint) {
throw InternalException("FIXME: GetUniqueConstraintKeys");
vector<PhysicalIndex> indexes;
if (constraint.HasIndex()) {
indexes.push_back(columns.LogicalToPhysical(constraint.GetIndex()));
} else {
for(auto &keyname : constraint.GetColumnNames()) {
indexes.push_back(columns.GetColumn(keyname).Physical());
}
}
return indexes;
}

DuckTableEntry::DuckTableEntry(Catalog &catalog, SchemaCatalogEntry &schema, BoundCreateTableInfo &info,
Expand Down

0 comments on commit 4f7b3de

Please sign in to comment.