GitHub user ajantha-bhat opened a pull request: https://github.com/apache/carbondata/pull/2485
[CARBONDATA-2722] [CARBONDATA-2721] JsonWriter issue fixes [CARBONDATA-2722][SDK] [JsonWriter] NPE when schema and data are not of same length or Data is null. problem: Null data is not handled in the json object to carbon row conversion. solution: add a null check when object is fetched from json map. [CARBONDATA-2721][SDK] [JsonWriter] Json writer is writing only first element of an array and discarding the rest of the elements. problem: converting json object to carbon row array object is based on array children count , instead of array element count. Hence as array will always have one children. only one element is filled. solution: use array element count instead of array children count.Be sure to do all of the following checklist to help us incorporate your contribution quickly and easily: - [ ] Any interfaces changed?NA - [ ] Any backward compatibility impacted?NA - [ ] Document update required?NA - [ ] Testing done updated the UT - [ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA. You can merge this pull request into a Git repository by running: $ git pull https://github.com/ajantha-bhat/carbondata master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/carbondata/pull/2485.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #2485 ---- commit 1152176762cba7c6b4686fbc2d7825c82e373e3c Author: ajantha-bhat <ajanthabhat@...> Date: 2018-07-09T13:15:30Z [CARBONDATA-2722][SDK] [JsonWriter] NPE when schema and data are not of same length or Data is null. problem: Null data is not handled in the json object to carbon row conversion. solution: add a null check when object is fetched from json map. [CARBONDATA-2721][SDK] [JsonWriter] Json writer is writing only first element of an array and discarding the rest of the elements. problem: converting json object to carbon row array object is based on array children count , instead of array element count. Hence as array will always have one children. only one element is filled. solution: use array element count instead of array children count. ---- ---