https://clickhouse.yandex/docs/en/operations/settings/settings/
distributed_product_mode¶
Changes the behavior of distributed subqueries.
ClickHouse applies this setting when the query contains the product of distributed tables, i.e. when the query for a distributed table contains a non-GLOBAL subquery for the distributed table.
Restrictions:
Only applied for IN and JOIN subqueries.
Only if the FROM section uses a distributed table containing more than one shard.
If the subquery concerns a distributed table containing more than one shard,
Not used for a table-valued remote function.
The possible values are:
deny — Default value. Prohibits using these types of subqueries (returns the "Double-distributed in/JOIN subqueries is denied" exception).
local — Replaces the database and table in the subquery with local ones for the destination server (shar