v.20.3New Feature
Added system tables and functions for generating zeros in ClickHouse
Added system tablessystem.zerosandsystem.zeros_mtas well as tale functionszeros()andzeros_mt(). Tables (and table functions) contain single column with namezeroand typeUInt8. This column contains zeros. It is needed for test purposes as the fastest method to generate many rows. This fixes #6604 #9593 (Nikolai Kochetov)
Why it matters
These additions provide an extremely fast method to generate large numbers of rows containing zeroes, primarily for testing and benchmarking purposes, improving the efficiency and simplicity of generating dummy data in queries.How to use it
Users can query the system tables directly usingSELECT * FROM system.zeros or system.zeros_mt. Alternatively, users can invoke the table functions in the FROM clause using SELECT * FROM zeros() or SELECT * FROM zeros_mt() to generate the zero-filled rows on-demand.