Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
ghx-label-6
Description
If an scalar subquery is used with an equality predicate, it must return only one row/column to be valid. If this can not be guaranteed at parse time through a single row aggregate or limit clause, Impala fails the query like such.
select i_manufact from item where i_item_sk = (select i_item_sk from item where i_item_sk = 1); ERROR: AnalysisException: Subquery must return a single row: (SELECT i_item_sk FROM tpcds_10000_parquet.item WHERE i_item_sk = 1)
Impala should allow these to run successfully by adding a run time assert in these cases if the SQ returns > 1 row when it should not.
This impacts TPC-DS query6, query54, query58.
Attachments
Issue Links
- relates to
-
IMPALA-1285 Subquery with group by and where could realize the result has one row.
- Open
1.
|
Add run time scalar subquery check for uncorrelated subqueries | Resolved | Zoltán Borók-Nagy | |
2.
|
Add run time scalar subquery check for correlated subqueries | Open | Unassigned | |
3.
|
Support uncorrelated subqueries in the select list | Resolved | Shant Hovsepian | |
4.
|
Support correlated subqueries in the select list | Open | Unassigned |