v.24.6New Feature

Added loop function for infinite query results in ClickHouse

Added a new table function loop to support returning query results in an infinite loop. #63452 (Sariel). This is useful for testing.
Added a new table function loop to support returning query results in an infinite loop.

Why it matters

The loop table function enables users to generate infinite query results, which is useful for testing scenarios such as load testing or simulating continuous data streams.

How to use it

Use the loop() table function in the FROM clause of your query to produce an infinite sequence of results. For example:

SELECT *
FROM loop()