ClickHouse/ch-go

Is there any way to create a column with LowCardinality(FixedString(8)) ?

jskcnsl opened this issue · 5 comments

I have a column 'LowCardinality(FixedString(8))' in clickhouse, but only ColStr support LowCardinality. So now I can't insert into it by ch-go.

Maybe I can copy LowCardinality() to ColFixStr ?

ernado commented

This is currently not possible because LowCardinality generic requires comparable values, and ColFixString value is byte slice.

Probably we can generate FixedStr8 (with [8]byte type), FixedStr16, FixedStr32, FixedStr64, FixedStr128, FixedStr256 and this will cover 80% cases. I'll take a look.

I don't understand, why byte slice can't compare ? I didn't find the code about Comparable 😂

ernado commented

@jskcnsl please try v0.57.0-alpha.0

Thanks! I will try it later