[ https://issues.apache.org/jira/browse/DRILL-3003?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14536044#comment-14536044 ]
Victoria Markman commented on DRILL-3003: ----------------------------------------- As Jason pointed out, this is perfectly valid query as well as this one: {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: afe70dd7-199f-4dae-802e-2b5e08f13af8 on atsqa4-133.qa.lab:31010] (state=,code=0) {code} > NPE on incorrect query (and instead of where clause) > ---------------------------------------------------- > > 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 > > 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)