[
https://issues.apache.org/jira/browse/DRILL-3003?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Aman Sinha updated DRILL-3003:
------------------------------
Fix Version/s: Future
> NPE with the query where on clause contains select with scalar aggregate
> ------------------------------------------------------------------------
>
> Key: DRILL-3003
> URL: https://issues.apache.org/jira/browse/DRILL-3003
> Project: Apache Drill
> Issue Type: Bug
> Components: SQL Parser
> Reporter: Victoria Markman
> Assignee: Aman Sinha
> Priority: Minor
> Fix For: Future
>
>
> Calcite throws null pointer exception:
> {code}
> 0: jdbc:drill:schema=dfs> select * from t1 right outer join t2 on (t1.a1 =
> t2.a2) and t1.a1 = ( select max(a3) from t3 );
> Error: PARSE ERROR: java.lang.NullPointerException
> [Error Id: 645fa4fb-7547-455f-a4b9-896fb6aa914e on atsqa4-133.qa.lab:31010]
> (state=,code=0)
> {code}
> Correct query works:
> {code}
> 0: jdbc:drill:schema=dfs> select * from t1 right outer join t2 on (t1.a1 =
> t2.a2) where t1.a1 = ( select max(a3) from t3 );
> +------------+------------+------------+------------+------------+------------+
> | a1 | b1 | c1 | a2 | b2 | c2
> |
> +------------+------------+------------+------------+------------+------------+
> | 3 | ccccc | 2015-01-03 | 3 | ccccc | 2015-01-03
> |
> +------------+------------+------------+------------+------------+------------+
> 1 row selected (0.236 seconds)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)