v.20.9New Feature
Added table function view for subqueries in ClickHouse
Added table function view which turns a subquery into a table object. This helps passing queries around. For instance, it can be used in remote/cluster table functions. #12567 (Amos Bird).Why it matters
Theview function addresses the need to pass queries as table objects, simplifying the use of subqueries within other table functions such as remote or cluster. This enhances flexibility and modularity in query construction.How to use it
Use theview function by wrapping a subquery inside it. For example:SELECT * FROM view('SELECT * FROM my_table WHERE condition')This allows the subquery to be treated as a table object and passed to other table functions like
remote or cluster.