vtlim commented on code in PR #12710:
URL: https://github.com/apache/druid/pull/12710#discussion_r910147202


##########
docs/querying/sql.md:
##########
@@ -185,20 +182,15 @@ UNION ALL
 SELECT COUNT(*) FROM tbl WHERE my_column = 'value2'
 ```
 
-With top-level UNION ALL, no further processing can be done after the UNION 
ALL. For example, the results of the
-UNION ALL cannot have GROUP BY, ORDER BY, or any other operators applied to 
them.
+> With top-level queries, you can't apply GROUP BY, ORDER BY, or any other 
operator to the results of a UNION ALL.
 
 ### Table-level
 
-UNION ALL can be used to query multiple tables at the same time. In this case, 
it must appear in a subquery in the
-FROM clause, and the lower-level subqueries that are inputs to the UNION ALL 
operator must be simple table SELECTs.
-Features like expressions, column aliasing, JOIN, GROUP BY, ORDER BY, and so 
on cannot be used. The query will run
-natively using a [union datasource](datasource.md#union).
+In table-level queries, you must use UNION ALL in a subquery in the FROM 
clause, and create the lower-level subqueries that are inputs to the UNION ALL 
operator as simple table SELECTs. You can't use features like expressions, 
column aliasing, JOIN, GROUP BY, or ORDER BY.

Review Comment:
   ```suggestion
   In table-level queries, you must use UNION ALL in a subquery in the FROM 
clause, and create the lower-level subqueries that are inputs to the UNION ALL 
operator as simple table SELECTs. You can't use features like expressions, 
column aliasing, JOIN, GROUP BY, or ORDER BY in table-level queries.
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to