GitHub user kunal642 opened a pull request:

    https://github.com/apache/carbondata/pull/2956

    [CARBONDATA-3134] fixed null values when cachelevel is set as blocklet

    **Problem:**
    For each blocklet an object of SegmentPropertiesAndSchemaHolder is created 
to store the schema used for query. This object is created only if no other 
blocklet has the same schema. To check the schema we are comparing 
List<ColumnSchema>, as the equals method in ColumnSchema does not check for 
columnUniqueId therefore this check is failing and the new restructured 
blocklet is using the schema of the old blocklet. Due to this the newly added 
column is being ignored as the old blocklet schema specifies that the column is 
delete(alter drop).
    
    **Solution:**
    Instead of checking the equality through equals and hashcode, write a new 
implementation for both and check based on columnUniqueId.
    
    Be sure to do all of the following checklist to help us incorporate 
    your contribution quickly and easily:
    
     - [ ] Any interfaces changed?
     
     - [ ] Any backward compatibility impacted?
     
     - [ ] Document update required?
    
     - [ ] Testing done
            Please provide details on 
            - Whether new unit test cases have been added or why no new tests 
are required?
            - How it is tested? Please attach test report.
            - Is it a performance related change? Please attach the performance 
test report.
            - Any additional information to help reviewers in testing this 
change.
           
     - [ ] 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/kunal642/carbondata bug/CARBONDATA-3134

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/carbondata/pull/2956.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 #2956
    
----
commit e74b3f22d285f5b5c37b17a11248b5e7977326b2
Author: kunal642 <kunalkapoor642@...>
Date:   2018-11-27T08:43:27Z

    [CARBONDATA-3134] fixed null values when cachelevel is set as blocklet
    
    Problem:
    For each blocklet an object of SegmentPropertiesAndSchemaHolder is created 
to store the schema used for query. This object is created only if no other 
blocklet has the same schema. To check the schema we are comparing 
List<ColumnSchema>, as the equals method in ColumnSchema does not check for 
columnUniqueId therefore this check is failing and the new restructured 
blocklet is using the schema of the old blocklet. Due to this the newly added 
column is being ignored as the old blocklet schema specifies that the column is 
delete(alter drop).
    
    Solution:
    Instead of checking the equality through equals and hashcode, write a new 
implementation for both and check based on columnUniqueId.

----


---

Reply via email to