carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jackylk <...@git.apache.org>
Subject [GitHub] incubator-carbondata pull request #576: [WIP] Improve query performance with...
Date Fri, 27 Jan 2017 09:02:19 GMT
Github user jackylk commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/576#discussion_r98163965
  
    --- Diff: core/src/main/java/org/apache/carbondata/core/keygenerator/mdkey/NumberCompressor.java
---
    @@ -137,12 +161,31 @@ public NumberCompressor(int cardinality) {
         return words;
       }
     
    +  //  public int[] unCompress(byte[] key, int offset, int length) {
    +  //    int ls = length;
    +  //    int arrayLength = (ls * BYTE_LENGTH) / bitsLength;
    +  //    long[] words = new long[getWordsSizeFromBytesSize(ls)];
    +  //    unCompressVal(key, ls, words, offset);
    +  //    return getArray(words, arrayLength);
    +  //  }
    +
       public int[] unCompress(byte[] key, int offset, int length) {
    -    int ls = length;
    -    int arrayLength = (ls * BYTE_LENGTH) / bitsLength;
    -    long[] words = new long[getWordsSizeFromBytesSize(ls)];
    -    unCompressVal(key, ls, words, offset);
    -    return getArray(words, arrayLength);
    +    int len = length / bytesPerKey;
    +    if (length % bytesPerKey != 0) {
    +      throw new IllegalArgumentException(
    +          "Some thing wrong while decompress" + length + " " + bytesPerKey);
    --- End diff --
    
    Both length is read from footer, right? If comes here, mean the file is corrupted.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message