LowCardinality(Nullable(String)) doesn't work
Description
Если в запросе присутствует поле с типом LowCardinality(Nullable(String)), то запрос просто зависает
Steps to reproduce
Использую для запросов конструкции из ваших примеров и до использования полей LowCardinality(Nullable(String)) всё работало отлично. Теперь же происходит просто зависание. Причем сначала отжирается резко несколько гигов оперативки.
Не работает ни такая конструкция:
do { while (reader.Read()) { } } while (reader.NextResult());
Ни такая:
reader.ReadAll(r =>
{
result.Add(reader.GetString(0));
});
Можно более конкретный пример? Нужна структура таблицы, нужен SQL запрос который виснет.
Running into the same problem. I had a column of Nullable(String) type. When I changed the column to LowCardinality(Nullable(String)), I get the following error
System.InvalidOperationException: Received unknown packet type Hello from server. at ClickHouse.Ado.Impl.ProtocolFormatter.ReadPacket(Response rv) at
ClickHouse.Ado.Impl.ProtocolFormatter.ReadResponse() at ClickHouse.Ado.ClickHouseDataReader.Close() at ClickHouse.Ado.ClickHouseDataReader.Dispose()
--
Looks like support for LowCardinality<Nullable<Something>> is completely broken in clickhouse itself. https://www.tinybird.co/blog-posts/tips-10-null-behavior-with-lowcardinality-columns https://github.com/ClickHouse/ClickHouse/issues/8406
I've implemented reading and writing of these types without regard to NULLs as they state in the docs, yet it sometimes eat up the first value on insert. Reads are OK though.
For now I think that's sufficient, I don't really understand the need to keep NULL and '' values distinct whilst saying it has 'low cardinality'.