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

    https://github.com/apache/incubator-carbondata/pull/56#discussion_r74032107
  
    --- Diff: 
core/src/main/java/org/carbondata/core/carbon/datastore/block/TableBlockInfo.java
 ---
    @@ -185,6 +207,16 @@ public long getBlockLength() {
             > ((TableBlockInfo) other).blockOffset + ((TableBlockInfo) 
other).blockLength) {
           return 1;
         }
    +    //compare the startBlockLetNumber
    +    int diffStartBlockLetNumber =
    +        blockletInfos.getStartBlockletNumber() - ((TableBlockInfo) 
other).blockletInfos
    --- End diff --
    
    Hi ,
    
    Would like to suggest a couple of things here remove 
Comparable<Distributable>  from the class definition as Distributable is 
already implementing it.
    
    Let use generics so that we donot have to typeCast everywhere in the 
compare method for that need to do two things:
    1) Change the class definition of Distributable  to :  
    public abstract class Distributable<T extends Distributable<T>> implements 
Comparable<T>
    
    2)  Change the compareTo method definition to:  
    public int compareTo(TableBlockInfo other)
    
    Let me know incase you are facing any isssue in doing this I will provide 
the patch if needed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to