ClickHouse/ch-go

ColMap support for LowCardinality(String) for both Keys and Values

yyfrankyy opened this issue · 2 comments

I cannot find a proper way to define a Map(LowCardinality(String), LowCardinality(String)), does anybody try to convert a map[string]string into this?

by defining it as proto.NewMap[string, string](new(proto.ColStr), new(proto.ColStr)), clickhouse-server will raise an Exception, Cannot convert: Map(String, String) to Map(LowCardinality(String), LowCardinality(String)), server version 22.8

You should try

proto.NewMap[string, string](new(proto.ColStr).LowCardinality(), new(proto.ColStr).LowCardinality())

ernado commented

As correctly stated, this is already possible with proto.NewMap[string, string](new(proto.ColStr).LowCardinality(), new(proto.ColStr).LowCardinality()).

Looks like this issue can be closed for now.