carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chenliang613 <...@git.apache.org>
Subject [GitHub] carbondata pull request #1660: [CARBONDATA-1731,CARBONDATA-1728] [BugFix] Up...
Date Fri, 15 Dec 2017 08:54:41 GMT
Github user chenliang613 commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1660#discussion_r157148988
  
    --- 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 --
    
    why here should add "return true" again ?  blockletDetails.get(index).addDeletedRows(blocklet.getDeletedRows())
should already return true ?


---

Mime
View raw message