Indhumathi27 opened a new pull request #3910:
URL: https://github.com/apache/carbondata/pull/3910


    ### Why is this PR needed?
    When DataType(For eg, StringType) object is serialized and deserialized 
using Gson, DataType object after deserialization, gets changed to Main class 
(DataType) instance instead of child type(StringType in this example). 
   
   Because of this, presto query on table with complex columns  fails with NPE, 
because while filing 
DimensionAndMeasureDetails(SegmentProperties.fillDimensionAndMeasureDetails)  
from CarbonLocalInputSplit.getDetailInfo, list of child dimensions will be left 
unfilled for Parent Carbon Dimension.
    
    ### What changes were proposed in this PR?
   1. Override JsonDeserializer method for DataType and deserialize the 
jsonObject based on its DataType child class instance.
   2. Add registerTypeAdapter for DataType class to gsonObject, while 
deserializing carbonLocalInputSplit.detailInfo.
       
    ### Does this PR introduce any user interface change?
    - No
   
    ### Is any new testcase added?
    - Yes
   
       
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to