Skip to content

Commit 2c9070c

Browse files
kmcqjonmagic
andauthored
Add varchar to Cassandra::Types.text mapping (#270)
Azure CosmosDB returns `varchar` as a type for `text` fields. This commit allows the `CqlTypeParser` to successfully ready `varchar` fields as `text`. Co-authored-by: Jon Hoyt <[email protected]>
1 parent 022906d commit 2c9070c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/cassandra/cluster/schema/cql_type_parser.rb

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ def parse(string, types)
4242
def lookup_type(node, types)
4343
case node.name
4444
when 'text' then Cassandra::Types.text
45+
when 'varchar' then Cassandra::Types.text
4546
when 'blob' then Cassandra::Types.blob
4647
when 'ascii' then Cassandra::Types.ascii
4748
when 'bigint' then Cassandra::Types.bigint

0 commit comments

Comments
 (0)