Github user anubhav100 commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1660#discussion_r157152251
  
    --- Diff: 
core/src/main/java/org/apache/carbondata/core/mutate/DeleteDeltaBlockDetails.java
 ---
    @@ -82,9 +80,21 @@ public boolean 
addBlockletDetails(DeleteDeltaBlockletDetails blocklet) {
     
       public boolean addBlocklet(String blockletId, String offset, Integer 
pageId) throws Exception {
         DeleteDeltaBlockletDetails blocklet = new 
DeleteDeltaBlockletDetails(blockletId, pageId);
    +    int index = blockletDetails.indexOf(blocklet);
    +
         try {
    -      blocklet.addDeletedRow(CarbonUpdateUtil.getIntegerValue(offset));
    -      return addBlockletDetails(blocklet);
    +      boolean isRowAddedForDeletion =
    +          blocklet.addDeletedRow(CarbonUpdateUtil.getIntegerValue(offset));
    +      if (isRowAddedForDeletion) {
    +        if (blockletDetails.isEmpty() || index == -1) {
    +          return blockletDetails.add(blocklet);
    +        } else {
    +          
blockletDetails.get(index).addDeletedRows(blocklet.getDeletedRows());
    +          return true;
    --- End diff --
    
    @chenliang613 i am looking into the suggestion which is given by @sounakr 
that is splits might have choosen duplicate blocks 


---

Reply via email to