Details
-
Sub-task
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
Scalar subquery plans are generated with a count on subquery which is fed to sq_count_check UDF. This is to make sure at runtime that there is at most one row generated by scalar subquery.
We can avoid generating this extra count for scalar subqueries with aggregates and windowing since such queries are guaranteed to generate at most one row. e.g.
select * from part where p_size > (select max(p_size) from part)
Attachments
Attachments
Issue Links
- is related to
-
HIVE-16793 Scalar sub-query: sq_count_check not required if gby keys are constant
- Closed
- links to