Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
0.4.0
-
None
Description
Certain queries on a JSON dataset throwing "Index out of bounds exception" errors when they process null arrays. The Null arrays are just returned fine when a variation of the query is attempted in such a way that different number of records are returned.
The specific query that reproduces the issue is below.
SELECT t.marketing_info.keywords FROM dfs.`/home/mapr/mobile.json` t where t.trans_info.purch_flag like 'true' and t.user_info.state like 'wa'
The issue seem to be occurring in the record below (note the empty keyword array). Modifying the keywords field to add a entry fixes the issue.
{"trans_id":10710,"date":"07/19/2013","time":"13:27:22","user_info":
{"cust_id":38533,"device":"IOS5","state":"wa"},"marketing_info":
{"camp_id":1,"keywords":[]},"trans_info":{"prod_id":[104,307],"purch_flag":"true"}}
Any variation of query done such as below works fine too.
SELECT t.marketing_info.keywords FROM dfs.`/home/mapr/mobile.json` t where t.user_info.state like 'wa' ;
SELECT t.marketing_info.keywords FROM dfs.`/home/mapr/mobile.json` t where t.trans_info.purch_flag like 'true' ;
SELECT t.marketing_info.keywords FROM dfs.`/home/mapr/mobile.json` t ;