From 1638d14976cdf70ccdf4db331a8d658dd48c8aa0 Mon Sep 17 00:00:00 2001 From: 317brian <53799971+317brian@users.noreply.github.com> Date: Tue, 31 Oct 2023 14:15:38 -0700 Subject: [PATCH] docs: blurb about msq union all (#15223) --- docs/querying/sql.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/querying/sql.md b/docs/querying/sql.md index 952c7c419a279..e8471c6a192be 100644 --- a/docs/querying/sql.md +++ b/docs/querying/sql.md @@ -218,9 +218,7 @@ UNION ALL SELECT COUNT(*) FROM tbl WHERE my_column = 'value2' ``` -:::info - With top-level queries, you can't apply GROUP BY, ORDER BY, or any other operator to the results of a UNION ALL. -::: +Certain limitations apply when you use a top-level UNION ALL. For all top-level UNION ALL queries, you can't apply a GROUP BY, ORDER BY, or any other operator to the results of the query. For any top-level UNION ALL that uses the MSQ task engine, the SQL planner attempts to plan the top-level UNION ALL as a table-level UNION ALL. Because of this, UNION ALL queries that use the MSQ task engine always behave the same as table-level UNION ALL queries. They have the same characteristics and limitations. If the planner can't plan the query as a table-level UNION ALL, the query fails. ### Table-level