mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 09:32:06 +00:00
commit
d20bae03fb
@ -1272,8 +1272,8 @@ MarkRanges MergeTreeDataSelectExecutor::filterMarksUsingIndex(
|
||||
const size_t min_marks_for_seek = roundRowsOrBytesToMarks(
|
||||
settings.merge_tree_min_rows_for_seek,
|
||||
settings.merge_tree_min_bytes_for_seek,
|
||||
part->index_granularity_info.index_granularity_bytes,
|
||||
part->index_granularity_info.fixed_index_granularity);
|
||||
part->index_granularity_info.fixed_index_granularity,
|
||||
part->index_granularity_info.index_granularity_bytes);
|
||||
|
||||
size_t granules_dropped = 0;
|
||||
|
||||
|
@ -399,7 +399,7 @@ BlockInputStreams StorageDistributed::read(
|
||||
if (force)
|
||||
{
|
||||
std::stringstream exception_message;
|
||||
if (has_sharding_key)
|
||||
if (!has_sharding_key)
|
||||
exception_message << "No sharding key";
|
||||
else
|
||||
exception_message << "Sharding key " << sharding_key_column_name << " is not used";
|
||||
|
@ -1,26 +1,26 @@
|
||||
set optimize_skip_unused_shards=1;
|
||||
|
||||
drop table if exists data_01068;
|
||||
drop table if exists dist_01068;
|
||||
drop table if exists data_01071;
|
||||
drop table if exists dist_01071;
|
||||
|
||||
create table data_01068 (key Int) Engine=Null();
|
||||
create table data_01071 (key Int) Engine=Null();
|
||||
|
||||
create table dist_01068 as data_01068 Engine=Distributed(test_cluster_two_shards, currentDatabase(), data_01068);
|
||||
create table dist_01071 as data_01071 Engine=Distributed(test_cluster_two_shards, currentDatabase(), data_01071);
|
||||
set force_optimize_skip_unused_shards=0;
|
||||
select * from dist_01068;
|
||||
select * from dist_01071;
|
||||
set force_optimize_skip_unused_shards=1;
|
||||
select * from dist_01068;
|
||||
select * from dist_01071;
|
||||
set force_optimize_skip_unused_shards=2;
|
||||
select * from dist_01068; -- { serverError 507 }
|
||||
select * from dist_01071; -- { serverError 507 }
|
||||
|
||||
drop table if exists dist_01068;
|
||||
create table dist_01068 as data_01068 Engine=Distributed(test_cluster_two_shards, currentDatabase(), data_01068, key%2);
|
||||
drop table if exists dist_01071;
|
||||
create table dist_01071 as data_01071 Engine=Distributed(test_cluster_two_shards, currentDatabase(), data_01071, key%2);
|
||||
set force_optimize_skip_unused_shards=0;
|
||||
select * from dist_01068;
|
||||
select * from dist_01071;
|
||||
set force_optimize_skip_unused_shards=1;
|
||||
select * from dist_01068; -- { serverError 507 }
|
||||
select * from dist_01071; -- { serverError 507 }
|
||||
set force_optimize_skip_unused_shards=2;
|
||||
select * from dist_01068; -- { serverError 507 }
|
||||
select * from dist_01071; -- { serverError 507 }
|
||||
|
||||
drop table if exists data_01068;
|
||||
drop table if exists dist_01068;
|
||||
drop table if exists data_01071;
|
||||
drop table if exists dist_01071;
|
||||
|
Loading…
Reference in New Issue
Block a user