Skip to content

Commit d7f8bc7

Browse files
committed
bug fix for casing in column map
1 parent e23351a commit d7f8bc7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/analyzer/add_implicit_prefix_lengths.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ func AddImplicitPrefixLengths(_ *sql.Context, _ *analyzer.Analyzer, node sql.Nod
6767
colMap := schToColMap(targetSchema)
6868

6969
for i, _ := range index.Columns {
70-
col, ok := colMap[index.Columns[i].Name]
70+
col, ok := colMap[strings.ToLower(index.Columns[i].Name)]
7171
if !ok {
7272
return nil, false, fmt.Errorf("indexed column %s not found in schema", index.Columns[i].Name)
7373
}
@@ -92,7 +92,7 @@ func AddImplicitPrefixLengths(_ *sql.Context, _ *analyzer.Analyzer, node sql.Nod
9292
}
9393
indexModified := false
9494
for i, _ := range newColumns {
95-
col, ok := colMap[newColumns[i].Name]
95+
col, ok := colMap[strings.ToLower(newColumns[i].Name)]
9696
if !ok {
9797
return nil, false, fmt.Errorf("indexed column %s not found in schema", newColumns[i].Name)
9898
}

0 commit comments

Comments
 (0)