You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by manishgupta88 <gi...@git.apache.org> on 2018/01/30 03:44:58 UTC

[GitHub] carbondata pull request #1879: [WIP] Fix measure min/max value problem while...

GitHub user manishgupta88 opened a pull request:

    https://github.com/apache/carbondata/pull/1879

    [WIP] Fix measure min/max value problem while reading from old store

    Modified code to fix measure min/max problem in old store. Problem in query comes when measure contains a negative value
    
     - [ ] Any interfaces changed?
     
     - [ ] Any backward compatibility impacted?
     
     - [ ] Document update required?
    
     - [ ] Testing done
            Please provide details on 
            - Whether new unit test cases have been added or why no new tests are required?
            - How it is tested? Please attach test report.
            - Is it a performance related change? Please attach the performance test report.
            - Any additional information to help reviewers in testing this change.
           
     - [ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA. 
    


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/manishgupta88/carbondata measure_min_max_fix

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/carbondata/pull/1879.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1879
    
----
commit 5c483fff32947c6495e3c231bb350fc816a04de4
Author: manishgupta88 <to...@...>
Date:   2018-01-30T03:26:13Z

    Modified code to fix measure min/max problem in old store

----


---

[GitHub] carbondata issue #1879: [WIP] Fix measure min/max value problem while readin...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1879
  
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/3239/



---

[GitHub] carbondata issue #1879: [CARBONDATA-2102] Fix measure min/max value problem ...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1879
  
    Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/2182/



---

[GitHub] carbondata issue #1879: [WIP] Fix measure min/max value problem while readin...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1879
  
    Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/2005/



---

[GitHub] carbondata pull request #1879: [CARBONDATA-2102] Fix measure min/max value p...

Posted by ravipesala <gi...@git.apache.org>.
Github user ravipesala commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1879#discussion_r164944758
  
    --- Diff: core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockletDataRefNodeWrapper.java ---
    @@ -132,13 +132,48 @@ public DimensionRawColumnChunk getDimensionChunk(FileHolder fileReader, int bloc
       public MeasureRawColumnChunk[] getMeasureChunks(FileHolder fileReader, int[][] blockIndexes)
           throws IOException {
         MeasureColumnChunkReader measureColumnChunkReader = getMeasureColumnChunkReader();
    -    return measureColumnChunkReader.readRawMeasureChunks(fileReader, blockIndexes);
    +    MeasureRawColumnChunk[] measureRawColumnChunks =
    +        measureColumnChunkReader.readRawMeasureChunks(fileReader, blockIndexes);
    +    updateMeasureRawColumnChunkMinMaxValues(measureRawColumnChunks);
    +    return measureRawColumnChunks;
       }
     
       @Override public MeasureRawColumnChunk getMeasureChunk(FileHolder fileReader, int blockIndex)
           throws IOException {
         MeasureColumnChunkReader measureColumnChunkReader = getMeasureColumnChunkReader();
    -    return measureColumnChunkReader.readRawMeasureChunk(fileReader, blockIndex);
    +    MeasureRawColumnChunk measureRawColumnChunk =
    --- End diff --
    
    Does it require to change at runtime? is it possible to update those while calling `CarbonUtil.updateMinMaxValues`


---

[GitHub] carbondata issue #1879: [CARBONDATA-2102] Fix measure min/max value problem ...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1879
  
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/3420/



---

[GitHub] carbondata issue #1879: [CARBONDATA-2102] Fix measure min/max value problem ...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1879
  
    Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/2172/



---

[GitHub] carbondata issue #1879: [CARBONDATA-2102] Fix measure min/max value problem ...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1879
  
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/3342/



---

[GitHub] carbondata issue #1879: [CARBONDATA-2102] Fix measure min/max value problem ...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1879
  
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/3310/



---

[GitHub] carbondata issue #1879: [CARBONDATA-2102] Fix measure min/max value problem ...

Posted by ravipesala <gi...@git.apache.org>.
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/1879
  
    SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/3235/



---

[GitHub] carbondata issue #1879: [CARBONDATA-2102] Fix measure min/max value problem ...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1879
  
    Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/2179/



---

[GitHub] carbondata issue #1879: [WIP] Fix measure min/max value problem while readin...

Posted by ravipesala <gi...@git.apache.org>.
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/1879
  
    SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/3195/



---

[GitHub] carbondata issue #1879: [CARBONDATA-2102] Fix measure min/max value problem ...

Posted by kevinjmh <gi...@git.apache.org>.
Github user kevinjmh commented on the issue:

    https://github.com/apache/carbondata/pull/1879
  
    I have a question about the following codes. Doesn't it make the compare method always return EQUAL? It compares same input argument.
    ```
          byte[][] firstBytes = splitKey(first.getByteArray(0));
     -    byte[][] secondBytes = splitKey(second.getByteArray(0));
     +   byte[][] secondBytes = splitKey(first.getByteArray(0));
    ```
    https://github.com/manishgupta88/carbondata/blob/84f56129687f53f546c60147a24f82e327ded173/core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockletDMComparator.java#L66


---

[GitHub] carbondata pull request #1879: [CARBONDATA-2102] Fix measure min/max value p...

Posted by ravipesala <gi...@git.apache.org>.
Github user ravipesala commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1879#discussion_r165294825
  
    --- Diff: core/src/main/java/org/apache/carbondata/core/datastore/block/TableBlockInfo.java ---
    @@ -72,6 +72,11 @@
       private String[] locations;
     
       private ColumnarFormatVersion version;
    +
    +  /**
    +   * flag to determine whether the data block is from old store or current store
    --- End diff --
    
    Mention the version of older store


---

[GitHub] carbondata issue #1879: [CARBONDATA-2102] Fix measure min/max value problem ...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1879
  
    Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/2055/



---

[GitHub] carbondata issue #1879: [CARBONDATA-2102] Fix measure min/max value problem ...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1879
  
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/3407/



---

[GitHub] carbondata issue #1879: [CARBONDATA-2102] Fix measure min/max value problem ...

Posted by ravipesala <gi...@git.apache.org>.
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/1879
  
    SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/3279/



---

[GitHub] carbondata issue #1879: [CARBONDATA-2102] Fix measure min/max value problem ...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1879
  
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/3417/



---

[GitHub] carbondata issue #1879: [CARBONDATA-2102] Fix measure min/max value problem ...

Posted by ravipesala <gi...@git.apache.org>.
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/1879
  
    @manishgupta88 Please rebase it


---

[GitHub] carbondata issue #1879: [CARBONDATA-2102] Fix measure min/max value problem ...

Posted by ravipesala <gi...@git.apache.org>.
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/1879
  
    SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/3243/



---

[GitHub] carbondata issue #1879: [CARBONDATA-2102] Fix measure min/max value problem ...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1879
  
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/3363/



---

[GitHub] carbondata issue #1879: [CARBONDATA-2102] Fix measure min/max value problem ...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1879
  
    Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/2127/



---

[GitHub] carbondata issue #1879: [CARBONDATA-2102] Fix measure min/max value problem ...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1879
  
    Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/2073/



---

[GitHub] carbondata issue #1879: [CARBONDATA-2102] Fix measure min/max value problem ...

Posted by ravipesala <gi...@git.apache.org>.
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/1879
  
    retest this please


---

[GitHub] carbondata issue #1879: [CARBONDATA-2102] Fix measure min/max value problem ...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1879
  
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/3288/



---

[GitHub] carbondata issue #1879: [CARBONDATA-2102] Fix measure min/max value problem ...

Posted by ravipesala <gi...@git.apache.org>.
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/1879
  
    LGTM


---

[GitHub] carbondata issue #1879: [WIP] Fix measure min/max value problem while readin...

Posted by jackylk <gi...@git.apache.org>.
Github user jackylk commented on the issue:

    https://github.com/apache/carbondata/pull/1879
  
    Can you add testcase for it?


---

[GitHub] carbondata issue #1879: [CARBONDATA-2102] Fix measure min/max value problem ...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1879
  
    Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/2106/



---

[GitHub] carbondata pull request #1879: [CARBONDATA-2102] Fix measure min/max value p...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/carbondata/pull/1879


---

[GitHub] carbondata pull request #1879: [CARBONDATA-2102] Fix measure min/max value p...

Posted by manishgupta88 <gi...@git.apache.org>.
Github user manishgupta88 commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1879#discussion_r164953838
  
    --- Diff: core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockletDataRefNodeWrapper.java ---
    @@ -132,13 +132,48 @@ public DimensionRawColumnChunk getDimensionChunk(FileHolder fileReader, int bloc
       public MeasureRawColumnChunk[] getMeasureChunks(FileHolder fileReader, int[][] blockIndexes)
           throws IOException {
         MeasureColumnChunkReader measureColumnChunkReader = getMeasureColumnChunkReader();
    -    return measureColumnChunkReader.readRawMeasureChunks(fileReader, blockIndexes);
    +    MeasureRawColumnChunk[] measureRawColumnChunks =
    +        measureColumnChunkReader.readRawMeasureChunks(fileReader, blockIndexes);
    +    updateMeasureRawColumnChunkMinMaxValues(measureRawColumnChunks);
    +    return measureRawColumnChunks;
       }
     
       @Override public MeasureRawColumnChunk getMeasureChunk(FileHolder fileReader, int blockIndex)
           throws IOException {
         MeasureColumnChunkReader measureColumnChunkReader = getMeasureColumnChunkReader();
    -    return measureColumnChunkReader.readRawMeasureChunk(fileReader, blockIndex);
    +    MeasureRawColumnChunk measureRawColumnChunk =
    --- End diff --
    
    here I am not calling CarbonUtil.updateMinMaxValues. I am just reversing the min and max values of measures based on oldStore flag. Thsi can be done only during runtime because this min max is at the page level which is read only at the the page level pruning


---