Home / Companies / Tinybird / Blog / Post Details
Content Deep Dive

ClickHouse ® tips #10: Null behavior with LowCardinality columns

Blog post from Tinybird

Post Details
Company
Date Published
Author
Alejandro del Amo
Word Count
102
Language
English
Hacker News Points
-
Summary

Inserting a NULL value into a LowCardinality(String) column in a database will result in it being stored as an empty string, demonstrating how the system internally handles such inputs. By using LowCardinality(Nullable(String)) as opposed to just Nullable(String), not only can one achieve the benefits associated with LowCardinality when the conditions are favorable, but it also enables ordering by that column. This illustrates the flexibility and advantages of using LowCardinality(Nullable(String)) in certain database operations.