Skip to content

Commit

Permalink
Checking for StringType implementations now that Doltgres extended ty…
Browse files Browse the repository at this point in the history
…pes can implement query types without implementing StringType
  • Loading branch information
fulghum committed Oct 7, 2024
1 parent fdd2454 commit 1d28860
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions go/libraries/doltcore/schema/schema_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -524,9 +524,10 @@ func (si *schemaImpl) getKeyColumnsDescriptor(convertAddressColumns bool) val.Tu
}
}
tt = append(tt, t)
if queryType == query.Type_CHAR || queryType == query.Type_VARCHAR || queryType == query.Type_TEXT {
stringType, isStringType := sqlType.(sql.StringType)
if isStringType && (queryType == query.Type_CHAR || queryType == query.Type_VARCHAR || queryType == query.Type_TEXT) {
useCollations = true
collations = append(collations, sqlType.(sql.StringType).Collation())
collations = append(collations, stringType.Collation())
} else {
collations = append(collations, sql.Collation_Unspecified)
}
Expand Down

0 comments on commit 1d28860

Please sign in to comment.