You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by GitBox <gi...@apache.org> on 2020/02/29 08:44:12 UTC

[GitHub] [carbondata] Zhangshunyu commented on a change in pull request #3644: [CARBONDATA-3727] Fix NPE of sort merger

Zhangshunyu commented on a change in pull request #3644: [CARBONDATA-3727] Fix NPE of sort merger
URL: https://github.com/apache/carbondata/pull/3644#discussion_r386013017
 
 

 ##########
 File path: processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/SingleThreadFinalSortFilesMerger.java
 ##########
 @@ -306,7 +306,7 @@ private IntermediateSortTempRow getSortedRecordFromFile() throws CarbonDataWrite
    * @return more element is present
    */
   public boolean hasNext() {
-    return this.recordHolderHeapLocal.size() > 0;
+    return this.recordHolderHeapLocal != null && this.recordHolderHeapLocal.size() > 0;
 
 Review comment:
   @ajantha-bhat after bucket table optimized and working fine can this NPE problem be exposed, so the test cases added with bucket table feature test cases in another pr based on bucket working. By the way, from code anylyse we alse can find this parameter might be null without npe checking.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services