Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: blurb about msq union all #15223

Merged
merged 4 commits into from
Oct 31, 2023
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions docs/querying/sql.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
:::
When you use a top-level UNION ALL, there are certain limitations that apply. 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 a 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.
317brian marked this conversation as resolved.
Show resolved Hide resolved

### Table-level

Expand Down
Loading