Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ func alterPrimaryKey(b BuildCtx, tn *tree.TableName, tbl *scpb.Table, t alterPri
fallBackIfShardedIndexExists(b, t, tbl.TableID)
fallBackIfPartitionedIndexExists(b, t, tbl.TableID)
fallBackIfRegionalByRowTable(b, t.n, tbl.TableID)
fallBackIfDescColInRowLevelTTLTables(b, tbl.TableID, t)
fallBackIfSubZoneConfigExists(b, t.n, tbl.TableID)

inflatedChain := getInflatedPrimaryIndexChain(b, tbl.TableID)
Expand Down Expand Up @@ -446,15 +445,6 @@ func fallBackIfRegionalByRowTable(b BuildCtx, t tree.NodeFormatter, tableID cati
}
}

// fallBackIfDescColInRowLevelTTLTables panics with an unimplemented
// error if the table is a (row-level-ttl table && (it has a descending
// key column || it has any inbound/outbound FK constraint)).
func fallBackIfDescColInRowLevelTTLTables(b BuildCtx, tableID catid.DescID, t alterPrimaryKeySpec) {
if _, _, rowLevelTTLElem := scpb.FindRowLevelTTL(b.QueryByID(tableID)); rowLevelTTLElem == nil {
return
}
}

func mustRetrieveCurrentPrimaryIndexElement(
b BuildCtx, tableID catid.DescID,
) (res *scpb.PrimaryIndex) {
Expand Down