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

Victoria Markman updated DRILL-2962:
------------------------------------
    Description: 
Filing this bug on Aman's request. It is not the same as DRILL-2949
DRILL-2949 has two outer tables.

{code}
0: jdbc:drill:schema=dfs> select * from t1 where a1 > (select avg(a2)*100 from 
t2 where t1.c1 = t2.c2);
Query failed: SYSTEM ERROR: Non-scalar sub-query used in an expression
See Apache Drill JIRA: DRILL-1937
[991f5544-d44f-4ba2-aa70-783a88a5b16a on atsqa4-133.qa.lab:31010]
Error: exception while executing query: Failure while executing query. 
(state=,code=0)

Correlated scalar aggregation without expression:

0: jdbc:drill:schema=dfs> select * from t1 where a1 > (select avg(a2) from t2 
where t1.c1 = t2.c2);
Query failed: SYSTEM ERROR: This query cannot be planned possibly due to either 
a cartesian join or an inequality join
[f238c0c0-efea-4684-8ec3-899fbcc2a075 on atsqa4-133.qa.lab:31010]
Error: exception while executing query: Failure while executing query. 
(state=,code=0)
{code}

  was:
Filing this bug on Aman's request. It is not the same as DRILL-2949
DRILL-2949 has two outer tables.

{code}
0: jdbc:drill:schema=dfs> select * from t1 where a1 > (select avg(a2)*100 from 
t2 where c1 = c2);
Query failed: SYSTEM ERROR: Non-scalar sub-query used in an expression
See Apache Drill JIRA: DRILL-1937
[991f5544-d44f-4ba2-aa70-783a88a5b16a on atsqa4-133.qa.lab:31010]
Error: exception while executing query: Failure while executing query. 
(state=,code=0)

Correlated scalar aggregation without expression:

0: jdbc:drill:schema=dfs> select * from t1 where a1 > (select avg(a2) from t2 
where c1 = c2);
Query failed: SYSTEM ERROR: This query cannot be planned possibly due to either 
a cartesian join or an inequality join
[f238c0c0-efea-4684-8ec3-899fbcc2a075 on atsqa4-133.qa.lab:31010]
Error: exception while executing query: Failure while executing query. 
(state=,code=0)
{code}


> Correlated subquery with scalar aggregate or scalar aggregate with expression 
> throws  and error
> -----------------------------------------------------------------------------------------------
>
>                 Key: DRILL-2962
>                 URL: https://issues.apache.org/jira/browse/DRILL-2962
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Query Planning & Optimization
>    Affects Versions: 0.9.0
>            Reporter: Victoria Markman
>            Assignee: Aman Sinha
>            Priority: Critical
>             Fix For: 1.0.0
>
>
> Filing this bug on Aman's request. It is not the same as DRILL-2949
> DRILL-2949 has two outer tables.
> {code}
> 0: jdbc:drill:schema=dfs> select * from t1 where a1 > (select avg(a2)*100 
> from t2 where t1.c1 = t2.c2);
> Query failed: SYSTEM ERROR: Non-scalar sub-query used in an expression
> See Apache Drill JIRA: DRILL-1937
> [991f5544-d44f-4ba2-aa70-783a88a5b16a on atsqa4-133.qa.lab:31010]
> Error: exception while executing query: Failure while executing query. 
> (state=,code=0)
> Correlated scalar aggregation without expression:
> 0: jdbc:drill:schema=dfs> select * from t1 where a1 > (select avg(a2) from t2 
> where t1.c1 = t2.c2);
> Query failed: SYSTEM ERROR: This query cannot be planned possibly due to 
> either a cartesian join or an inequality join
> [f238c0c0-efea-4684-8ec3-899fbcc2a075 on atsqa4-133.qa.lab:31010]
> Error: exception while executing query: Failure while executing query. 
> (state=,code=0)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to