drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Victoria Markman (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (DRILL-2051) NPE when querying view with where clause and derived table
Date Thu, 08 Oct 2015 20:56:26 GMT

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

Victoria Markman resolved DRILL-2051.
-------------------------------------
    Resolution: Fixed

> 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
>             Fix For: Future
>
>         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)

Mime
View raw message