ClickHouseWarehouseCatalog
The WarehouseCatalog of a ClickHouse server, over the host's client-v2 client:
the sources are the tables and views of databases that
system.tableslists, but for the materialized views (their data is in the tables they writeTO), their inner tables andwow_catalogitself;a table's columns are
system.columns', in order;the
wow_catalogrows of a table are those of format 1 in its database'swow_catalog, read withFINAL: a row of the same content written again is one row. A database withoutwow_cataloghas none. Its rows are read only from a table whosewriterisMATERIALIZED currentUser()on aReplacingMergeTree, as the ClickHouse sink creates it: the column is what makes a row say who inserted it, which the trust rules read. Awow_catalogof another shape is refused, naming it (catalogRows).
Each statement's result is read as JSONEachRow on Dispatchers.IO.