This is about clickhouse sharding key in distributed table.
I have a replicatedmergetree table with field A with "LowCardinality(String)" type, and I use sipHash64(A) as sharding key in distributed table.
But when I set optimize_skip_unused_shards=true, got exception "Sharding key expression does not evaluate to an integer type." when I query distributed table with filter A=xxxx.
Does this mean sharding key can't apply to string field? I'm using 19.16.
So sipHash64(cast('foo', 'LowCardinality(String)'))returns LowCardinality(UInt64) and optimize_skip_unused_shards for LowCardinality has been fixed in #10611
Most helpful comment
So
sipHash64(cast('foo', 'LowCardinality(String)'))returnsLowCardinality(UInt64)andoptimize_skip_unused_shardsforLowCardinalityhas been fixed in #10611