mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 10:02:01 +00:00
Merge pull request #50234 from azat/fix-nested-dist-cte
Fix nested distributed SELECT in WITH clause
This commit is contained in:
commit
8e51a15606
@ -60,6 +60,15 @@ ColumnsDescription getStructureOfRemoteTableInShard(
|
||||
ColumnsDescription res;
|
||||
auto new_context = ClusterProxy::updateSettingsForCluster(cluster, context, context->getSettingsRef(), table_id);
|
||||
|
||||
/// Ignore limit for result number of rows (that could be set during handling CSE/CTE),
|
||||
/// since this is a service query and should not lead to query failure.
|
||||
{
|
||||
Settings new_settings = new_context->getSettings();
|
||||
new_settings.max_result_rows = 0;
|
||||
new_settings.max_result_bytes = 0;
|
||||
new_context->setSettings(new_settings);
|
||||
}
|
||||
|
||||
/// Expect only needed columns from the result of DESC TABLE. NOTE 'comment' column is ignored for compatibility reasons.
|
||||
Block sample_block
|
||||
{
|
||||
|
@ -0,0 +1,3 @@
|
||||
1
|
||||
1
|
||||
1
|
@ -0,0 +1,5 @@
|
||||
with (select count() > 0 from remote('127.2', system.settings)) as s select s;
|
||||
-- nested
|
||||
with (select count() > 0 from remote('127.2', remote('127.2', system.settings))) as s select s;
|
||||
-- nested via view()
|
||||
with (select count() > 0 from remote('127.2', view(select count() from remote('127.2', system.settings)))) as s select s;
|
Loading…
Reference in New Issue
Block a user