Skip to content

Commit

Permalink
Merge pull request #8420 from dolthub/fulghum/text-support
Browse files Browse the repository at this point in the history
Check for `StringType` support before casting
  • Loading branch information
fulghum authored Oct 8, 2024
2 parents 870852f + 1d28860 commit 2c8007b
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 2c8007b

Please sign in to comment.