[GitHub] carbondata pull request #2598: [CARBONDATA-2811][BloomDataMap] Add query tes...

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

[GitHub] carbondata pull request #2598: [CARBONDATA-2811][BloomDataMap] Add query tes...

qiuchenjian-2
GitHub user kevinjmh opened a pull request:

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

    [CARBONDATA-2811][BloomDataMap] Add query test case using search mode on table with bloom filter

    Add query test case using search mode on table with bloom filter
   
    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 bloom_searchmode

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

    https://github.com/apache/carbondata/pull/2598.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 #2598
   
----
commit 2d6c9b9aeb306607305fbaf66a885e6cecc5676b
Author: Manhua <kevinjmh@...>
Date:   2018-08-02T02:21:16Z

    add search mode test case with bloom

----


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

[GitHub] carbondata issue #2598: [CARBONDATA-2811][BloomDataMap] Add query test case ...

qiuchenjian-2
Github user CarbonDataQA commented on the issue:

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



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

[GitHub] carbondata issue #2598: [CARBONDATA-2811][BloomDataMap] Add query test case ...

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

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



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

[GitHub] carbondata issue #2598: [CARBONDATA-2811][BloomDataMap] Add query test case ...

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

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


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

[GitHub] carbondata issue #2598: [CARBONDATA-2811][BloomDataMap] Add query test case ...

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

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



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

[GitHub] carbondata issue #2598: [CARBONDATA-2811][BloomDataMap] Add query test case ...

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

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



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

[GitHub] carbondata issue #2598: [CARBONDATA-2811][BloomDataMap] Add query test case ...

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

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



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

[GitHub] carbondata issue #2598: [CARBONDATA-2811][BloomDataMap] Add query test case ...

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

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



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

[GitHub] carbondata issue #2598: [CARBONDATA-2811][BloomDataMap] Add query test case ...

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

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


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

[GitHub] carbondata pull request #2598: [CARBONDATA-2811][BloomDataMap] Add query tes...

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

    https://github.com/apache/carbondata/pull/2598#discussion_r207447030
 
    --- Diff: integration/spark2/src/test/scala/org/apache/carbondata/datamap/bloom/BloomCoarseGrainDataMapSuite.scala ---
    @@ -219,6 +220,62 @@ class BloomCoarseGrainDataMapSuite extends QueryTest with BeforeAndAfterAll with
         sql(s"DROP TABLE IF EXISTS $bloomDMSampleTable")
       }
     
    +  test("test using search mode to query tabel with bloom datamap") {
    +    sql(
    +      s"""
    +         | CREATE TABLE $normalTable(id INT, name STRING, city STRING, age INT,
    +         | s1 STRING, s2 STRING, s3 STRING, s4 STRING, s5 STRING, s6 STRING, s7 STRING, s8 STRING)
    +         | STORED BY 'carbondata' TBLPROPERTIES('table_blocksize'='128')
    +         |  """.stripMargin)
    +    sql(
    +      s"""
    +         | CREATE TABLE $bloomDMSampleTable(id INT, name STRING, city STRING, age INT,
    +         | s1 STRING, s2 STRING, s3 STRING, s4 STRING, s5 STRING, s6 STRING, s7 STRING, s8 STRING)
    +         | STORED BY 'carbondata' TBLPROPERTIES('table_blocksize'='128')
    +         |  """.stripMargin)
    +
    +    // load two segments
    +    (1 to 2).foreach { i =>
    +      sql(
    +        s"""
    +           | LOAD DATA LOCAL INPATH '$bigFile' INTO TABLE $normalTable
    +           | OPTIONS('header'='false')
    +         """.stripMargin)
    +      sql(
    +        s"""
    +           | LOAD DATA LOCAL INPATH '$bigFile' INTO TABLE $bloomDMSampleTable
    +           | OPTIONS('header'='false')
    +         """.stripMargin)
    +    }
    +
    +    sql(
    +      s"""
    +         | CREATE DATAMAP $dataMapName ON TABLE $bloomDMSampleTable
    +         | USING 'bloomfilter'
    +         | DMProperties('INDEX_COLUMNS'='city,id', 'BLOOM_SIZE'='640000')
    +      """.stripMargin)
    +
    +    checkExistence(sql(s"SHOW DATAMAP ON TABLE $bloomDMSampleTable"), true, dataMapName)
    +
    +    // get answer before search mode is enable
    +    val expectedAnswer1 = sql(s"select * from $normalTable where id = 1").collect()
    +    val expectedAnswer2 = sql(s"select * from $normalTable where city in ('city_999')").collect()
    +
    +    carbonSession.startSearchMode()
    +    assert(carbonSession.isSearchModeEnabled)
    +
    +    checkAnswer(
    --- End diff --
   
    but how you confirm the query uses the bloomfilter?


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

[GitHub] carbondata pull request #2598: [CARBONDATA-2811][BloomDataMap] Add query tes...

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

    https://github.com/apache/carbondata/pull/2598#discussion_r207458031
 
    --- Diff: integration/spark2/src/test/scala/org/apache/carbondata/datamap/bloom/BloomCoarseGrainDataMapSuite.scala ---
    @@ -219,6 +220,62 @@ class BloomCoarseGrainDataMapSuite extends QueryTest with BeforeAndAfterAll with
         sql(s"DROP TABLE IF EXISTS $bloomDMSampleTable")
       }
     
    +  test("test using search mode to query tabel with bloom datamap") {
    +    sql(
    +      s"""
    +         | CREATE TABLE $normalTable(id INT, name STRING, city STRING, age INT,
    +         | s1 STRING, s2 STRING, s3 STRING, s4 STRING, s5 STRING, s6 STRING, s7 STRING, s8 STRING)
    +         | STORED BY 'carbondata' TBLPROPERTIES('table_blocksize'='128')
    +         |  """.stripMargin)
    +    sql(
    +      s"""
    +         | CREATE TABLE $bloomDMSampleTable(id INT, name STRING, city STRING, age INT,
    +         | s1 STRING, s2 STRING, s3 STRING, s4 STRING, s5 STRING, s6 STRING, s7 STRING, s8 STRING)
    +         | STORED BY 'carbondata' TBLPROPERTIES('table_blocksize'='128')
    +         |  """.stripMargin)
    +
    +    // load two segments
    +    (1 to 2).foreach { i =>
    +      sql(
    +        s"""
    +           | LOAD DATA LOCAL INPATH '$bigFile' INTO TABLE $normalTable
    +           | OPTIONS('header'='false')
    +         """.stripMargin)
    +      sql(
    +        s"""
    +           | LOAD DATA LOCAL INPATH '$bigFile' INTO TABLE $bloomDMSampleTable
    +           | OPTIONS('header'='false')
    +         """.stripMargin)
    +    }
    +
    +    sql(
    +      s"""
    +         | CREATE DATAMAP $dataMapName ON TABLE $bloomDMSampleTable
    +         | USING 'bloomfilter'
    +         | DMProperties('INDEX_COLUMNS'='city,id', 'BLOOM_SIZE'='640000')
    +      """.stripMargin)
    +
    +    checkExistence(sql(s"SHOW DATAMAP ON TABLE $bloomDMSampleTable"), true, dataMapName)
    +
    +    // get answer before search mode is enable
    +    val expectedAnswer1 = sql(s"select * from $normalTable where id = 1").collect()
    +    val expectedAnswer2 = sql(s"select * from $normalTable where city in ('city_999')").collect()
    +
    +    carbonSession.startSearchMode()
    +    assert(carbonSession.isSearchModeEnabled)
    +
    +    checkAnswer(
    --- End diff --
   
    Question also for `LuceneFineGrainDataMapWithSearchModeSuite`
   
    If we use EXPLAIN command, it won't run in Search Mode.
   
    When we debug this test case, we can see that the query will be pruned in Master side of search mode using `getSplit` method in CarbonTableInputFormat which finally using datamap to prune.
     
    So that should be confirm in other test case with same table schema and data, and take this test case as an extended test only for  Search Mode feature.  This test case also does not care about whether the datamap created before or after data load.


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

[GitHub] carbondata issue #2598: [CARBONDATA-2811][BloomDataMap] Add query test case ...

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

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



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

[GitHub] carbondata issue #2598: [CARBONDATA-2811][BloomDataMap] Add query test case ...

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

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



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

[GitHub] carbondata issue #2598: [CARBONDATA-2811][BloomDataMap] Add query test case ...

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

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



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

[GitHub] carbondata issue #2598: [CARBONDATA-2811][BloomDataMap] Add query test case ...

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

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



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

[GitHub] carbondata issue #2598: [CARBONDATA-2811][BloomDataMap] Add query test case ...

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

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



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

[GitHub] carbondata issue #2598: [CARBONDATA-2811][BloomDataMap] Add query test case ...

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

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



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

[GitHub] carbondata issue #2598: [CARBONDATA-2811][BloomDataMap] Add query test case ...

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

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


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

[GitHub] carbondata issue #2598: [CARBONDATA-2811][BloomDataMap] Add query test case ...

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

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



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

[GitHub] carbondata issue #2598: [CARBONDATA-2811][BloomDataMap] Add query test case ...

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

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



---
12