[GitHub] carbondata pull request #2781: [CARBONDATA-2983][BloomDataMap] Change bloom ...

classic Classic list List threaded Threaded
19 messages Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #2781: [CARBONDATA-2983][BloomDataMap] Change bloom ...

qiuchenjian-2
GitHub user kevinjmh opened a pull request:

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

    [CARBONDATA-2983][BloomDataMap] Change bloom query model to proceed multiple filter values

    currently, bloom generates multiple query model for each value of InExpression.
    This PR changes the query model to proceed multiple filter values.
    Also, intersect result between query model/expression to support AndExpression optimize
   
   
    Be sure to do all of the following checklist to help us incorporate
    your contribution quickly and easily:
   
     - [ ] 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/kevinjmh/carbondata query_model

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

    https://github.com/apache/carbondata/pull/2781.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 #2781
   
----
commit 25ab0270021ec1c58219690c7389003c553768bf
Author: Manhua <kevinjmh@...>
Date:   2018-09-28T03:39:39Z

    build 1 query model for InExp;
    intersect result between query model/expression

----


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2781: [CARBONDATA-2983][BloomDataMap] Change bloom query m...

qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2781
 
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/621/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2781: [CARBONDATA-2983][BloomDataMap] Change bloom query m...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2781
 
    Build Failed  with Spark 2.3.1, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/8882/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2781: [CARBONDATA-2983][BloomDataMap] Change bloom query m...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2781
 
    Build Failed with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/813/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2781: [CARBONDATA-2983][BloomDataMap] Change bloom query m...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user xuchuanyin commented on the issue:

    https://github.com/apache/carbondata/pull/2781
 
    This PR is supposed to optimize the pruning for InExpression.
    For a expression like colA in (1, 2, 3).
    Previously it will create 3 bloom query model and for each query model it will iterate all the bloomfilters; But now we only need to generate 1 bloom query model.
   
    Also this PR does an intersection for the pruned result generated by each expression. This optimization is important if we have multiple index columns and used them in one query.


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #2781: [CARBONDATA-2983][BloomDataMap] Change bloom ...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user xuchuanyin commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/2781#discussion_r221177988
 
    --- Diff: datamap/bloom/src/main/java/org/apache/carbondata/datamap/bloom/BloomCoarseGrainDataMap.java ---
    @@ -194,16 +186,25 @@ private String getAncestorTablePath(CarbonTable currentTable) {
               // skip shard which has been pruned in Main datamap
               continue;
             }
    -        boolean scanRequired = bloomFilter.membershipTest(new Key(bloomQueryModel.filterValue));
    -        if (scanRequired) {
    -          LOGGER.debug(String.format("BloomCoarseGrainDataMap: Need to scan -> blocklet#%s",
    -              String.valueOf(bloomFilter.getBlockletNo())));
    -          Blocklet blocklet = new Blocklet(bloomFilter.getShardName(),
    -                  String.valueOf(bloomFilter.getBlockletNo()));
    -          hitBlocklets.add(blocklet);
    +        for (byte[] value: bloomQueryModel.filterValues) {
    +          boolean scanRequired = bloomFilter.membershipTest(new Key(value));
    +          if (scanRequired) {
    +            LOGGER.debug(String.format("BloomCoarseGrainDataMap: Need to scan -> blocklet#%s",
    +                String.valueOf(bloomFilter.getBlockletNo())));
    +            Blocklet blocklet = new Blocklet(bloomFilter.getShardName(),
    +                String.valueOf(bloomFilter.getBlockletNo()));
    +            tempHitBlockletsResult.add(blocklet);
    --- End diff --
   
    we can just break here if one of the values hit the blocklets -- this is a possible optimization for InExpression.
    please leave a comment here if you accept the suggestion.


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #2781: [CARBONDATA-2983][BloomDataMap] Change bloom ...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user xuchuanyin commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/2781#discussion_r221178600
 
    --- Diff: datamap/bloom/src/main/java/org/apache/carbondata/datamap/bloom/BloomCoarseGrainDataMap.java ---
    @@ -194,16 +186,25 @@ private String getAncestorTablePath(CarbonTable currentTable) {
               // skip shard which has been pruned in Main datamap
               continue;
             }
    -        boolean scanRequired = bloomFilter.membershipTest(new Key(bloomQueryModel.filterValue));
    -        if (scanRequired) {
    -          LOGGER.debug(String.format("BloomCoarseGrainDataMap: Need to scan -> blocklet#%s",
    -              String.valueOf(bloomFilter.getBlockletNo())));
    -          Blocklet blocklet = new Blocklet(bloomFilter.getShardName(),
    -                  String.valueOf(bloomFilter.getBlockletNo()));
    -          hitBlocklets.add(blocklet);
    +        for (byte[] value: bloomQueryModel.filterValues) {
    +          boolean scanRequired = bloomFilter.membershipTest(new Key(value));
    +          if (scanRequired) {
    +            LOGGER.debug(String.format("BloomCoarseGrainDataMap: Need to scan -> blocklet#%s",
    +                String.valueOf(bloomFilter.getBlockletNo())));
    +            Blocklet blocklet = new Blocklet(bloomFilter.getShardName(),
    +                String.valueOf(bloomFilter.getBlockletNo()));
    +            tempHitBlockletsResult.add(blocklet);
    +          } else {
    +            LOGGER.debug(String.format("BloomCoarseGrainDataMap: Skip scan -> blocklet#%s",
    --- End diff --
   
    This log is wrong here. we can only get this conclusion only if all the filter values fails the bloomfilter.


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2781: [CARBONDATA-2983][BloomDataMap] Change bloom query m...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2781
 
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/622/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2781: [CARBONDATA-2983][BloomDataMap] Change bloom query m...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2781
 
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/626/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2781: [CARBONDATA-2983][BloomDataMap] Change bloom query m...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2781
 
    Build Failed with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/818/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2781: [CARBONDATA-2983][BloomDataMap] Change bloom query m...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2781
 
    Build Success with Spark 2.3.1, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/8887/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2781: [CARBONDATA-2983][BloomDataMap] Change bloom query m...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user kevinjmh commented on the issue:

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


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2781: [CARBONDATA-2983][BloomDataMap] Change bloom query m...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2781
 
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/631/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2781: [CARBONDATA-2983][BloomDataMap] Change bloom query m...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2781
 
    Build Success with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/823/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2781: [CARBONDATA-2983][BloomDataMap] Change bloom query m...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2781
 
    Build Success with Spark 2.3.1, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/8892/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2781: [CARBONDATA-2983][BloomDataMap] Change bloom query m...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user xuchuanyin commented on the issue:

    https://github.com/apache/carbondata/pull/2781
 
    LGTM
    I think this PR is OK. @ravipesala please check again


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2781: [CARBONDATA-2983][BloomDataMap] Change bloom query m...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user xuchuanyin commented on the issue:

    https://github.com/apache/carbondata/pull/2781
 
    @ravipesala Can you check and merge this PR?


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2781: [CARBONDATA-2983][BloomDataMap] Change bloom query m...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:

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


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #2781: [CARBONDATA-2983][BloomDataMap] Change bloom ...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user asfgit closed the pull request at:

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


---