docs: blurb about msq union all (#15223)

This commit is contained in:
317brian 2023-10-31 14:15:38 -07:00 committed by GitHub
parent e6b7c36e74
commit 87695410ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 3 deletions

View File

@ -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