Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
0.8.0
-
None
Description
#Wed Jan 21 12:38:45 EST 2015 git.commit.id.abbrev=8d1e1af
`customer.json`
{ "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 }
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)
Query by itself works fine:
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)
If you remove where clause and leave just derived table in the view creation, you can query the view as well.