mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
Add test with different databases.
This commit is contained in:
parent
0de06f59b1
commit
f67b5182ea
@ -106,7 +106,7 @@ ContextMutablePtr updateSettingsForCluster(const Cluster & cluster, ContextPtr c
|
||||
if (query_info && query_info->additional_filter_ast)
|
||||
{
|
||||
Tuple tuple;
|
||||
tuple.push_back(main_table.getFullTableName());
|
||||
tuple.push_back(main_table.getShortName());
|
||||
tuple.push_back(queryToString(query_info->additional_filter_ast));
|
||||
new_settings.additional_table_filters.value.push_back(std::move(tuple));
|
||||
}
|
||||
|
@ -0,0 +1,3 @@
|
||||
4 dddd
|
||||
5 a
|
||||
6 bb
|
20
tests/queries/0_stateless/02346_additional_filters_distr.sql
Normal file
20
tests/queries/0_stateless/02346_additional_filters_distr.sql
Normal file
@ -0,0 +1,20 @@
|
||||
-- Tags: no-parallel, distributed
|
||||
|
||||
create database if not exists shard_0;
|
||||
create database if not exists shard_1;
|
||||
|
||||
drop table if exists dist_02346;
|
||||
drop table if exists shard_0.data_02346;
|
||||
drop table if exists shard_1.data_02346;
|
||||
|
||||
create table shard_0.data_02346 (x UInt32, y String) engine = MergeTree order by x settings index_granularity = 2;
|
||||
insert into shard_0.data_02346 values (1, 'a'), (2, 'bb'), (3, 'ccc'), (4, 'dddd');
|
||||
|
||||
create table shard_1.data_02346 (x UInt32, y String) engine = MergeTree order by x settings index_granularity = 2;
|
||||
insert into shard_1.data_02346 values (5, 'a'), (6, 'bb'), (7, 'ccc'), (8, 'dddd');
|
||||
|
||||
create table dist_02346 (x UInt32, y String) engine=Distributed('test_cluster_two_shards_different_databases', /* default_database= */ '', data_02346);
|
||||
|
||||
set max_rows_to_read=4;
|
||||
|
||||
select * from dist_02346 order by x settings additional_table_filters={'dist_02346' : 'x > 3 and x < 7'};
|
Loading…
Reference in New Issue
Block a user