mirror of
https://github.com/dolthub/dolt.git
synced 2026-05-06 11:20:30 -05:00
/go/libraries/doltcore/schema/col_coll.go: fix bug breaking bounty scoreboard
This commit is contained in:
@@ -77,9 +77,11 @@ func NewColCollection(cols ...Column) *ColCollection {
|
||||
lowerNameToCol := make(map[string]Column, len(cols))
|
||||
tagToIdx := make(map[uint64]int, len(cols))
|
||||
|
||||
var columns []Column
|
||||
for i, col := range cols {
|
||||
// If multiple columns have the same tag, the last one is used for tag lookups.
|
||||
// Columns must have unique tags to pass schema.ValidateForInsert.
|
||||
columns = append(columns, col)
|
||||
tagToCol[col.Tag] = col
|
||||
tagToIdx[col.Tag] = i
|
||||
tags = append(tags, col.Tag)
|
||||
@@ -97,7 +99,7 @@ func NewColCollection(cols ...Column) *ColCollection {
|
||||
sort.Slice(sortedTags, func(i, j int) bool { return sortedTags[i] < sortedTags[j] })
|
||||
|
||||
return &ColCollection{
|
||||
cols: cols,
|
||||
cols: columns,
|
||||
Tags: tags,
|
||||
SortedTags: sortedTags,
|
||||
TagToCol: tagToCol,
|
||||
|
||||
Reference in New Issue
Block a user