GitHub user ndwangsen opened a pull request:
https://github.com/apache/carbondata/pull/2483 [CARBONDATA-2719]Table update/delete is needed block on table having datamaps [CARBONDATA-2719]Table update/delete is needed block on table having datamaps Be sure to do all of the following checklist to help us incorporate your contribution quickly and easily: - [ ] Any interfaces changed? NA - [ ] Any backward compatibility impacted? NA - [ ] Document update required? NA - [ ] 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 Test case, and test pass in environment - [ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA. NA You can merge this pull request into a Git repository by running: $ git pull https://github.com/ndwangsen/incubator-carbondata tb_dm_update_del Alternatively you can review and apply these changes as the patch at: https://github.com/apache/carbondata/pull/2483.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 #2483 ---- commit 96d3bab7d2a88ee59d5b3fd25bda058aa1e13751 Author: ndwangsen <luffy.wang@...> Date: 2018-07-11T03:52:09Z [CARBONDATA-2719]Table update/delete is needed block on table having datamaps ---- --- |
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2483 Build Failed with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7005/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2483 Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/5783/ --- |
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:
https://github.com/apache/carbondata/pull/2483 SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/5758/ --- |
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/2483#discussion_r202013849 --- Diff: integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/iud/DeleteCarbonTableTestCase.scala --- @@ -298,6 +298,43 @@ class DeleteCarbonTableTestCase extends QueryTest with BeforeAndAfterAll { } + test("test to check if delete table is reflected in table with datamaps") { --- End diff -- please split it into two testcase, one for index datamap, another for preaggregate datamap the title can be "block deleting records from table which has index datamap" and "block deleting records from table which has preaggregate datamap" --- |
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/2483#discussion_r202014417 --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/hive/CarbonAnalysisRules.scala --- @@ -55,7 +57,23 @@ case class CarbonIUDAnalysisRule(sparkSession: SparkSession) extends Rule[Logica Seq.empty, isDistinct = false), "tupleId")()) val projList = Seq(UnresolvedAlias(UnresolvedStar(alias.map(Seq(_)))), tupleId) - + val carbonTable = CarbonEnv.getCarbonTable(table.tableIdentifier)(sparkSession) + if (carbonTable != null) { + if (CarbonUtil.hasAggregationDataMap(carbonTable)) { + throw new UnsupportedOperationException( + "Update operation is not supported for tables which have a pre-aggregate table. " + + "Drop pre-aggregate tables to continue.") + } + if (carbonTable.isChildDataMap) { + throw new UnsupportedOperationException( + "Update operation is not supported for pre-aggregate table") + } + val indexSchemas = DataMapStoreManager.getInstance().getDataMapSchemasOfTable(carbonTable) + if (!indexSchemas.isEmpty) { + throw new UnsupportedOperationException( + "Update operation is not supported for table with datamaps") --- End diff -- Update operation is not supported for table which has index datamaps --- |
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/2483#discussion_r202014007 --- Diff: integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/iud/UpdateCarbonTableTestCase.scala --- @@ -713,6 +713,44 @@ class UpdateCarbonTableTestCase extends QueryTest with BeforeAndAfterAll { sql("drop table if exists senten") } + test("test to check if update table is reflected in table with datamaps") { --- End diff -- please split it into two testcase, one for index datamap, another for preaggregate datamap the title can be "block updating table which has index datamap" and "block updating table which has preaggregate datamap" --- |
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/2483#discussion_r202014508 --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/hive/CarbonAnalysisRules.scala --- @@ -170,6 +188,23 @@ case class CarbonIUDAnalysisRule(sparkSession: SparkSession) extends Rule[Logica Seq.empty, isDistinct = false), "tupleId")()) val projList = Seq(UnresolvedAlias(UnresolvedStar(alias.map(Seq(_)))), tupleId) + val carbonTable = CarbonEnv.getCarbonTable(table.tableIdentifier)(sparkSession) + if (carbonTable != null) { + if (CarbonUtil.hasAggregationDataMap(carbonTable)) { + throw new UnsupportedOperationException( + "Delete operation is not supported for tables which have a pre-aggregate table. " + + "Drop pre-aggregate tables to continue.") + } + if (carbonTable.isChildDataMap) { + throw new UnsupportedOperationException( + "Delete operation is not supported for pre-aggregate table") + } + val indexSchemas = DataMapStoreManager.getInstance().getDataMapSchemasOfTable(carbonTable) + if (!indexSchemas.isEmpty) { + throw new UnsupportedOperationException( + "Delete operation is not supported for table with datamaps") --- End diff -- Delete operation is not supported for table which has index datamaps --- |
In reply to this post by qiuchenjian-2
Github user xuchuanyin commented on the issue:
https://github.com/apache/carbondata/pull/2483 please fix the comments --- |
In reply to this post by qiuchenjian-2
Github user ndwangsen commented on the issue:
https://github.com/apache/carbondata/pull/2483 modified according to comments --- |
In reply to this post by qiuchenjian-2
Github user ndwangsen commented on the issue:
https://github.com/apache/carbondata/pull/2483 retest this please --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2483 Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7062/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2483 Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/5844/ --- |
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:
https://github.com/apache/carbondata/pull/2483 SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/5808/ --- |
In reply to this post by qiuchenjian-2
Github user xuchuanyin commented on the issue:
https://github.com/apache/carbondata/pull/2483 LGTM please change the PR title to 'Block update and delete on table having datamaps' --- |
In reply to this post by qiuchenjian-2
Github user xuchuanyin commented on the issue:
https://github.com/apache/carbondata/pull/2483 LGTM --- |
In reply to this post by qiuchenjian-2
|
Free forum by Nabble | Edit this page |