v.23.2Improvement

Support for LowCardinality Data Types in generateRandom Table Function

The generateRandom table function and the engine now support LowCardinality data types. This is useful for testing, for example you can write INSERT INTO table SELECT * FROM generateRandom() LIMIT 1000. This is needed to debug #45590. #45661 (Alexey Milovidov).
Support for LowCardinality data types in the generateRandom table function and engine.

Why it matters

This feature enables generating random data with LowCardinality column types, which is useful for testing and debugging scenarios, such as reproducing and investigating issues like #45590.

How to use it

Use the generateRandom table function as before, but now it supports LowCardinality columns. For example:

INSERT INTO table SELECT * FROM generateRandom() LIMIT 1000


This will generate random data that properly utilizes LowCardinality types.