From 1d28860668adaa6240d36fa9ef635cb0ab3b5f96 Mon Sep 17 00:00:00 2001 From: Jason Fulghum Date: Mon, 7 Oct 2024 16:57:08 -0700 Subject: [PATCH] Checking for StringType implementations now that Doltgres extended types can implement query types without implementing StringType --- go/libraries/doltcore/schema/schema_impl.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/go/libraries/doltcore/schema/schema_impl.go b/go/libraries/doltcore/schema/schema_impl.go index 7763f7519b..bd24fe037b 100644 --- a/go/libraries/doltcore/schema/schema_impl.go +++ b/go/libraries/doltcore/schema/schema_impl.go @@ -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) }