This impacts the Grafana plugin.

From https://github.com/grafana/clickhouse-datasource/issues/198


    if an adhoc filter is specified for the field t1_distributed.f2
        the following query will be built by the plugin SELECT f1 from t1_distributed settings additional_table_filters = {'t1_distributed': 'f2 = xxx'}
        this query will actually not do its job of filtering
        i guess it is coming from the fact that additional_table_filters are applied by clickhouse when it reads the table....but distributed tables are not read.....
        if i replace in the built query, within the additional_table_filters settings, t1_distributed with t1_local (so a query like `SELECT f1 from t1_distributed settings additional_table_filters = {'t1_local': 'f2 = xxx'}), then it is working as expected
    i gave a try to add an adhoc filter on the "local" table (while my "main" query is still on the distributed table) (ie define an adhoc filter on the fied t1_local.f2)
        then the built query by the plugin does not include any additional_table_filters settings (i guess there is a check in order to add additional_table_filters only on the table used in the query)




{
            ColumnDescription column;
            column.name = (*name)[i].get<const String &>();
            String data_type_name = (*type)[i].get<const String &>();
            column.type = data_type_factory.get(data_type_name);
            String kind_name = (*default_kind)[i].get<const String &>();
            if (!kind_name.empty())
            {
                column.default_desc.kind = columnDefaultKindFromString(kind_name);
                String expr_str = (*default_expr)[i].get<const String &>();
                column.default_desc.expression = parseQuery(
                    expr_parser, expr_str.data(), expr_str.data() + expr_str.size(), "default expression", 0, context->getSettingsRef().max_parser_depth);
            }
            res.add(column);
        }
    }
    executor.finish();
    return res;
}
ColumnsDescription getStructureOfRemoteTable(
    const Cluster & cluster,
    const StorageID & table_id,
    ContextPtr context,
    const ASTPtr & table_func_ptr)
{
    const auto & shards_info = cluster.getShardsInfo();
    std::string fail_messages;
    
    for (const auto & shard_info : shards_info)
    {