mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Merge pull request #12040 from azat/dist-fixes
Tiny fixes for distributed queries
This commit is contained in:
commit
82061da77c
@ -28,7 +28,7 @@ Context removeUserRestrictionsFromSettings(const Context & context, const Settin
|
||||
new_settings.max_concurrent_queries_for_user.changed = false;
|
||||
new_settings.max_memory_usage_for_user.changed = false;
|
||||
|
||||
if (settings.force_optimize_skip_unused_shards_nesting)
|
||||
if (settings.force_optimize_skip_unused_shards_nesting && settings.force_optimize_skip_unused_shards)
|
||||
{
|
||||
if (new_settings.force_optimize_skip_unused_shards_nesting == 1)
|
||||
{
|
||||
@ -48,7 +48,7 @@ Context removeUserRestrictionsFromSettings(const Context & context, const Settin
|
||||
}
|
||||
}
|
||||
|
||||
if (settings.optimize_skip_unused_shards_nesting)
|
||||
if (settings.optimize_skip_unused_shards_nesting && settings.optimize_skip_unused_shards)
|
||||
{
|
||||
if (new_settings.optimize_skip_unused_shards_nesting == 1)
|
||||
{
|
||||
|
@ -722,7 +722,7 @@ ClusterPtr StorageDistributed::getOptimizedCluster(const Context & context, cons
|
||||
std::stringstream exception_message;
|
||||
if (!has_sharding_key)
|
||||
exception_message << "No sharding key";
|
||||
else if (sharding_key_is_deterministic)
|
||||
else if (!sharding_key_is_deterministic)
|
||||
exception_message << "Sharding key is not deterministic";
|
||||
else
|
||||
exception_message << "Sharding key " << sharding_key_column_name << " is not used";
|
||||
|
Loading…
Reference in New Issue
Block a user