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

Ramana Inukonda Nagaraj updated DRILL-1344:
-------------------------------------------

    Description: 
With a json record as follows:

{code}
"trans_id":9,"date":null,"time":"20:16:13","user_info":null,"marketing_info":{"camp_id":2,"keywords":null},"trans_info":{"prod_id":[85,546,247,530,73,111,1,488,100,100,3,476,503,312],"purch_flag":"false"}
{code}

select date from the json results in a correct value as null.
select user_info though results in {}

Similarly 
select marketing_info results in
{"camp_id":2,"keywords":[]}

Correct behavior should be to return null for null complex types and null for 
members of complex types.

  was:
With a json record as follows:

"trans_id":9,"date":null,"time":"20:16:13","user_info":null,"marketing_info":{"camp_id":2,"keywords":null},"trans_info":{"prod_id":[85,546,247,530,73,111,1,488,100,100,3,476,503,312],"purch_flag":"false"}

select date from the json results in a correct value as null.
select user_info though results in {}

Similarly 
select marketing_info results in
{"camp_id":2,"keywords":[]}

Correct behavior should be to return null for null complex types and null for 
members of complex types.


> Nested json object null is treated as {}
> ----------------------------------------
>
>                 Key: DRILL-1344
>                 URL: https://issues.apache.org/jira/browse/DRILL-1344
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Storage - JSON
>            Reporter: Ramana Inukonda Nagaraj
>
> With a json record as follows:
> {code}
> "trans_id":9,"date":null,"time":"20:16:13","user_info":null,"marketing_info":{"camp_id":2,"keywords":null},"trans_info":{"prod_id":[85,546,247,530,73,111,1,488,100,100,3,476,503,312],"purch_flag":"false"}
> {code}
> select date from the json results in a correct value as null.
> select user_info though results in {}
> Similarly 
> select marketing_info results in
> {"camp_id":2,"keywords":[]}
> Correct behavior should be to return null for null complex types and null for 
> members of complex types.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to