You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Jacques Nadeau (JIRA)" <ji...@apache.org> on 2015/05/05 15:38:07 UTC

[jira] [Updated] (DRILL-2051) NPE when querying view with where clause and derived table

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

Jacques Nadeau updated DRILL-2051:
----------------------------------
    Fix Version/s:     (was: 1.0.0)
                   1.2.0

> NPE when querying view with where clause and derived table
> ----------------------------------------------------------
>
>                 Key: DRILL-2051
>                 URL: https://issues.apache.org/jira/browse/DRILL-2051
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Query Planning & Optimization
>    Affects Versions: 0.8.0
>            Reporter: Victoria Markman
>            Assignee: Jinfeng Ni
>             Fix For: 1.2.0
>
>         Attachments: drill-2051.log
>
>
> {code}
> #Wed Jan 21 12:38:45 EST 2015
> git.commit.id.abbrev=8d1e1af
> {code}
> `customer.json`
> {code}
> { "CustomerId": "100", "cityId": 10 }
> { "CustomerId": "101", "cityId": 10 }
> { "CustomerId": "102", "cityId": 10 }
> { "CustomerId": "103", "cityId": 20 }
> { "CustomerId": "104", "cityId": 30 }
> { "CustomerId": "105", "cityId": null }
> { "CustomerId": null,  "cityId": 50 }
> {code}
> {code}
> 0: jdbc:drill:schema=dfs> create view v3 as select * from ( select * from `customer.json` ) where customerid >= 100;
> +------------+------------+
> |     ok     |  summary   |
> +------------+------------+
> | true       | View 'v3' created successfully in 'dfs.identifiers' schema |
> +------------+------------+
> 1 row selected (0.063 seconds)
> 0: jdbc:drill:schema=dfs> select * from v3;
> Query failed: NullPointerException: 
> Error: exception while executing query: Failure while executing query. (state=,code=0)
> {code}
> Query by itself works fine:
> {code}
> 0: jdbc:drill:schema=dfs> select * from ( select * from `customer.json` ) where CustomerId >= 100;
> +------------+------------+
> | CustomerId |   cityId   |
> +------------+------------+
> | 100        | 10         |
> | 101        | 10         |
> | 102        | 10         |
> | 103        | 20         |
> | 104        | 30         |
> | 105        | null       |
> +------------+------------+
> 6 rows selected (0.117 seconds)
> {code}
> If you remove where clause and leave just derived table in the view creation, you can query the view as well.



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