You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@impala.apache.org by "Greg Rahn (JIRA)" <ji...@apache.org> on 2017/03/20 06:13:41 UTC

[jira] [Updated] (IMPALA-5100) add runtime single row subquery check

     [ https://issues.apache.org/jira/browse/IMPALA-5100?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Greg Rahn updated IMPALA-5100:
------------------------------
    Labels:   (was: planner)

> add runtime single row subquery check
> -------------------------------------
>
>                 Key: IMPALA-5100
>                 URL: https://issues.apache.org/jira/browse/IMPALA-5100
>             Project: IMPALA
>          Issue Type: Improvement
>          Components: Backend, Frontend
>            Reporter: Greg Rahn
>              Labels: planner
>
> If an uncorrelated subquery is used with an equality predicate, it must return only one row 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.
> {noformat}
> 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)
> {noformat}
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)