ClickHouse-Net icon indicating copy to clipboard operation
ClickHouse-Net copied to clipboard

Type LowCardinality(Nullable(String)) not supported in v2.0.5

Open rpbarbosa opened this issue 1 year ago • 1 comments

Description: In version v2.0.5, when inserting into a table with a column of type LowCardinality(Nullable(String)), the column value is always null.

Steps to reproduce: Just run this code and then do "SELECT * FROM TestTable", and you can see that the selected row has column string1 with value null. If running the exact same SQL statements in the ClickHouse HTTP client, the row has the expected value 'Test1'.

        using (ClickHouseConnection connection = new ClickHouseConnection(connectionString))
        {
            connection.Open();
            using (ClickHouseCommand command = connection.CreateCommand())
            {
                command.CommandText = @"CREATE TABLE TestTable
                                        (
                                            `id` UInt32,
                                            `string1` LowCardinality(Nullable(String)),
                                            `string2` Nullable(String)
                                        )
                                        ENGINE = MergeTree()
                                        ORDER BY (id)";
                command.ExecuteNonQuery();
            }
            using (ClickHouseCommand command = connection.CreateCommand())
            {
                command.CommandText = "INSERT INTO TestTable(id, string1, string2) VALUES (1,'Test1','Test2')";
                command.ExecuteNonQuery();
            }
        }

What should be done: Add support for columns of type LowCardinality(Nullable(String))

rpbarbosa avatar May 09 '24 15:05 rpbarbosa

just noticed https://github.com/killwort/ClickHouse-Net/issues/121

rpbarbosa avatar May 09 '24 15:05 rpbarbosa