GitHub user xubo245 opened a pull request:
https://github.com/apache/carbondata/pull/2325 [CARBONDATA-2499][Test] Validate the visible/invisible status of datamap This jira https://issues.apache.org/jira/browse/CARBONDATA-2380 not check the visible/invisible status of datamap. There will not thro exception when the related code changed and affect visible/invisible status of datamap. So we should add some test case for this function. When I develop https://github.com/apache/carbondata/pull/2290, carbon don't throw exception when I change the org.apache.carbondata.core.datamap.DataMapStoreManager#getAllVisibleDataMap Be sure to do all of the following checklist to help us incorporate your contribution quickly and easily: - [ ] Any interfaces changed? No - [ ] Any backward compatibility impacted? No - [ ] Document update required? No - [ ] 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. add some test cases - [ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA. No You can merge this pull request into a Git repository by running: $ git pull https://github.com/xubo245/carbondata CARBONDATA-2499-validateVisible Alternatively you can review and apply these changes as the patch at: https://github.com/apache/carbondata/pull/2325.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 #2325 ---- commit a42afea3c1d55bde4b07fa7dbb972262e45be100 Author: xubo245 <xubo29@...> Date: 2018-05-21T07:47:24Z [CARBONDATA-2499][Test] Validate the visible/invisible status of datamap ---- --- |
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2325 Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/5999/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2325 Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/4840/ --- |
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:
https://github.com/apache/carbondata/pull/2325 SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/5018/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2325 Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/4851/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2325 Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/6020/ --- |
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:
https://github.com/apache/carbondata/pull/2325 SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/5030/ --- |
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/2325#discussion_r189806847 --- Diff: integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/datamap/CGDataMapTestCase.scala --- @@ -420,6 +419,63 @@ class CGDataMapTestCase extends QueryTest with BeforeAndAfterAll { sql("select * from normal_test where name='n502670' and city='c2670'")) } + test("test cg datamap and validate the visible and invisible status of datamap ") { --- End diff -- The above testcase can be removed. --- |
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/2325#discussion_r189808113 --- Diff: integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/datamap/FGDataMapTestCase.scala --- @@ -481,6 +479,62 @@ class FGDataMapTestCase extends QueryTest with BeforeAndAfterAll { sql("select * from normal_test where name='n502670' and city='c2670'")) } + test("test fg datamap and validate the visible and invisible status of datamap ") { --- End diff -- I think you can add a new testcaseSuite to test the visibility of datamap and it will eliminate some duplicate code. Besides, I've noticed that you pointed that the invisibility for lucence datamap may cause failure. Better to add that test in the same testcaseSuite. --- |
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/2325#discussion_r189807360 --- Diff: integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/datamap/CGDataMapTestCase.scala --- @@ -420,6 +419,63 @@ class CGDataMapTestCase extends QueryTest with BeforeAndAfterAll { sql("select * from normal_test where name='n502670' and city='c2670'")) } + test("test cg datamap and validate the visible and invisible status of datamap ") { + val tableName = "datamap_test2" + val dataMapName1 = "ggdatamap1"; + sql(s"DROP TABLE IF EXISTS $tableName") + sql( + s""" + | CREATE TABLE $tableName(id INT, name STRING, city STRING, age INT) + | STORED BY 'org.apache.carbondata.format' + | TBLPROPERTIES('SORT_COLUMNS'='city,name', 'SORT_SCOPE'='LOCAL_SORT') + """.stripMargin) + val table = CarbonMetadata.getInstance().getCarbonTable("default_datamap_test") + // register datamap writer + sql( + s""" + | CREATE DATAMAP ggdatamap1 ON TABLE $tableName + | USING '${classOf[CGDataMapFactory].getName}' + | DMPROPERTIES('index_columns'='name') + """.stripMargin) + sql( + s""" + | CREATE DATAMAP ggdatamap2 ON TABLE $tableName + | USING '${classOf[CGDataMapFactory].getName}' + | DMPROPERTIES('index_columns'='city') + """.stripMargin) + sql(s"LOAD DATA LOCAL INPATH '$file2' INTO TABLE $tableName OPTIONS('header'='false')") + + val df1 = sql(s"EXPLAIN EXTENDED SELECT * FROM $tableName WHERE name='n502670'").collect() + assertResult( --- End diff -- I think we can simply verify the result by judging whether the output of explain contains `ggdatamap1`. --- |
In reply to this post by qiuchenjian-2
Github user xubo245 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2325#discussion_r189820511 --- Diff: integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/datamap/CGDataMapTestCase.scala --- @@ -420,6 +419,63 @@ class CGDataMapTestCase extends QueryTest with BeforeAndAfterAll { sql("select * from normal_test where name='n502670' and city='c2670'")) } + test("test cg datamap and validate the visible and invisible status of datamap ") { + val tableName = "datamap_test2" + val dataMapName1 = "ggdatamap1"; + sql(s"DROP TABLE IF EXISTS $tableName") + sql( + s""" + | CREATE TABLE $tableName(id INT, name STRING, city STRING, age INT) + | STORED BY 'org.apache.carbondata.format' + | TBLPROPERTIES('SORT_COLUMNS'='city,name', 'SORT_SCOPE'='LOCAL_SORT') + """.stripMargin) + val table = CarbonMetadata.getInstance().getCarbonTable("default_datamap_test") + // register datamap writer + sql( + s""" + | CREATE DATAMAP ggdatamap1 ON TABLE $tableName + | USING '${classOf[CGDataMapFactory].getName}' + | DMPROPERTIES('index_columns'='name') + """.stripMargin) + sql( + s""" + | CREATE DATAMAP ggdatamap2 ON TABLE $tableName + | USING '${classOf[CGDataMapFactory].getName}' + | DMPROPERTIES('index_columns'='city') + """.stripMargin) + sql(s"LOAD DATA LOCAL INPATH '$file2' INTO TABLE $tableName OPTIONS('header'='false')") + + val df1 = sql(s"EXPLAIN EXTENDED SELECT * FROM $tableName WHERE name='n502670'").collect() + assertResult( --- End diff -- Can you confirm it is correct if change it ontains ggdatamap1? --- |
In reply to this post by qiuchenjian-2
Github user xubo245 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2325#discussion_r189821513 --- Diff: integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/datamap/FGDataMapTestCase.scala --- @@ -481,6 +479,62 @@ class FGDataMapTestCase extends QueryTest with BeforeAndAfterAll { sql("select * from normal_test where name='n502670' and city='c2670'")) } + test("test fg datamap and validate the visible and invisible status of datamap ") { --- End diff -- lucene datamap don't support invisibility feature, please refer:https://issues.apache.org/jira/browse/CARBONDATA-2502 --- |
In reply to this post by qiuchenjian-2
Github user xubo245 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2325#discussion_r191037249 --- Diff: integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/datamap/CGDataMapTestCase.scala --- @@ -420,6 +419,63 @@ class CGDataMapTestCase extends QueryTest with BeforeAndAfterAll { sql("select * from normal_test where name='n502670' and city='c2670'")) } + test("test cg datamap and validate the visible and invisible status of datamap ") { --- End diff -- Why? --- |
In reply to this post by qiuchenjian-2
Github user xubo245 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2325#discussion_r191037363 --- Diff: integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/datamap/CGDataMapTestCase.scala --- @@ -420,6 +419,63 @@ class CGDataMapTestCase extends QueryTest with BeforeAndAfterAll { sql("select * from normal_test where name='n502670' and city='c2670'")) } + test("test cg datamap and validate the visible and invisible status of datamap ") { --- End diff -- Ok, I will add some validate in old test case --- |
In reply to this post by qiuchenjian-2
Github user xubo245 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2325#discussion_r191037680 --- Diff: integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/datamap/FGDataMapTestCase.scala --- @@ -481,6 +479,62 @@ class FGDataMapTestCase extends QueryTest with BeforeAndAfterAll { sql("select * from normal_test where name='n502670' and city='c2670'")) } + test("test fg datamap and validate the visible and invisible status of datamap ") { --- End diff -- Jacky said there are many test case suite, it shouldn't add more test case suite if there exists related test case suite --- |
In reply to this post by qiuchenjian-2
Github user xubo245 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2325#discussion_r191037873 --- Diff: integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/datamap/CGDataMapTestCase.scala --- @@ -420,6 +419,63 @@ class CGDataMapTestCase extends QueryTest with BeforeAndAfterAll { sql("select * from normal_test where name='n502670' and city='c2670'")) } + test("test cg datamap and validate the visible and invisible status of datamap ") { + val tableName = "datamap_test2" + val dataMapName1 = "ggdatamap1"; + sql(s"DROP TABLE IF EXISTS $tableName") + sql( + s""" + | CREATE TABLE $tableName(id INT, name STRING, city STRING, age INT) + | STORED BY 'org.apache.carbondata.format' + | TBLPROPERTIES('SORT_COLUMNS'='city,name', 'SORT_SCOPE'='LOCAL_SORT') + """.stripMargin) + val table = CarbonMetadata.getInstance().getCarbonTable("default_datamap_test") + // register datamap writer + sql( + s""" + | CREATE DATAMAP ggdatamap1 ON TABLE $tableName + | USING '${classOf[CGDataMapFactory].getName}' + | DMPROPERTIES('index_columns'='name') + """.stripMargin) + sql( + s""" + | CREATE DATAMAP ggdatamap2 ON TABLE $tableName + | USING '${classOf[CGDataMapFactory].getName}' + | DMPROPERTIES('index_columns'='city') + """.stripMargin) + sql(s"LOAD DATA LOCAL INPATH '$file2' INTO TABLE $tableName OPTIONS('header'='false')") + + val df1 = sql(s"EXPLAIN EXTENDED SELECT * FROM $tableName WHERE name='n502670'").collect() + assertResult( --- End diff -- I changed @xuchuanyin --- |
In reply to this post by qiuchenjian-2
Github user xubo245 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2325#discussion_r191037943 --- Diff: integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/datamap/CGDataMapTestCase.scala --- @@ -420,6 +419,63 @@ class CGDataMapTestCase extends QueryTest with BeforeAndAfterAll { sql("select * from normal_test where name='n502670' and city='c2670'")) } + test("test cg datamap and validate the visible and invisible status of datamap ") { --- End diff -- ok, I removedã and change old test case --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2325 Build Failed with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/6110/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2325 Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/4948/ --- |
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:
https://github.com/apache/carbondata/pull/2325 SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/5104/ --- |
Free forum by Nabble | Edit this page |