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

Daniel Voros updated HIVE-15224:
--------------------------------
    Attachment: HIVE-15224.2-branch-1.patch

Attaching patch #2. This fixes the test failure above by modifying the expected 
output of the test.

The issue arose from the different handling of put(_, null) in org.json and 
json-simple. While json-simple simply adds null values, org.json treats putting 
null as deleting the property.

I've chosen "hiding" this difference by overwriting the expected output for two 
reasons:
 - Adding null in the test case didn't wan't to delete an existing a property. 
It only happened because the test case wasn't populating some fields that 
should be populated in a normal run. After going through all usages of put(), I 
believe it was never intentionally used for deleting.
 - The only solution to save the exact same behavior of org.json would be to 
check for null whenever calling put(). I think most of the times putting a null 
valued property is a design issue and might be worth noticing in the future.

> replace org.json usage in branch-1 with as minor changes as possible
> --------------------------------------------------------------------
>
>                 Key: HIVE-15224
>                 URL: https://issues.apache.org/jira/browse/HIVE-15224
>             Project: Hive
>          Issue Type: Sub-task
>            Reporter: Zoltan Haindrich
>            Assignee: Daniel Voros
>         Attachments: HIVE-15224.1-branch-1.patch, HIVE-15224.2-branch-1.patch
>
>
> branch-1 / master have diverged in many ways - StatsCollector have changed; 
> EximUtil supports new replication
> ...so backporting any changes from master would be hard.
> maybe we should use some drop-in replacement like the android one.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to