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

 ##########
 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:
   good. can you please add a test for this scenario ?

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to