GitHub user Sssan520 opened a pull request:
https://github.com/apache/carbondata/pull/2641 [CARBONDATA-2819] Fixed cannot drop preagg datamap on table which has other type datamaps As we know, carbon now write preagg datamap info to main table schema and write other type datamap info like bloom or lucene to .dmschema file in _system folder. When dropping datamap, we should both check the .dmschema files and main table info if has the datamap which to be deleted. Be sure to do all of the following checklist to help us incorporate your contribution quickly and easily: - [No] Any interfaces changed? - [No] Any backward compatibility impacted? - [No] Document update required? - [Yes] 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. - [Na] 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/Sssan520/carbondata droppreaggsimple Alternatively you can review and apply these changes as the patch at: https://github.com/apache/carbondata/pull/2641.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 #2641 ---- commit 94edb0d78d816c8fa108e761c3313c588dc794f1 Author: Sssan520 <liangap2008@...> Date: 2018-07-02T11:12:24Z [CARBONDATA-2819] Fixed cannot drop preagg datamap on table if the table has other type datamaps ---- --- |
Github user Sssan520 commented on the issue:
https://github.com/apache/carbondata/pull/2641 There are some problems, so I closed #2619 and opened this PR --- |
In reply to this post by qiuchenjian-2
Github user Sssan520 commented on the issue:
https://github.com/apache/carbondata/pull/2641 retest this please --- |
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:
https://github.com/apache/carbondata/pull/2641 SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/6281/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2641 Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7929/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2641 Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/6652/ --- |
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/2641#discussion_r210781685 --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/datamap/CarbonDropDataMapCommand.scala --- @@ -116,8 +116,12 @@ case class CarbonDropDataMapCommand( // drop index datamap on the main table if (mainTable != null && DataMapStoreManager.getInstance().getAllDataMap(mainTable).size() > 0) { - dropDataMapFromSystemFolder(sparkSession) - return Seq.empty + val dmSchemaOp = DataMapStoreManager.getInstance().getAllDataMap(mainTable).asScala. + find(_.getDataMapSchema.getDataMapName.equalsIgnoreCase(dataMapName)) --- End diff -- I think you can use `.exists` instead of `.find` and move this check to line 118 --- |
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/2641#discussion_r210781860 --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/datamap/CarbonDropDataMapCommand.scala --- @@ -160,9 +164,8 @@ case class CarbonDropDataMapCommand( } else if (!ifExistsSet) { throw new NoSuchDataMapException(dataMapName, tableName) } - } else if (mainTable != null && - mainTable.getTableInfo.getDataMapSchemaList.size() == 0) { - dropDataMapFromSystemFolder(sparkSession) + } else if (!ifExistsSet) { + throw new NoSuchDataMapException(dataMapName) --- End diff -- Is this case for preagg datamap? --- |
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/2641#discussion_r210782045 --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/datamap/CarbonDropDataMapCommand.scala --- @@ -116,8 +116,12 @@ case class CarbonDropDataMapCommand( // drop index datamap on the main table if (mainTable != null && DataMapStoreManager.getInstance().getAllDataMap(mainTable).size() > 0) { - dropDataMapFromSystemFolder(sparkSession) - return Seq.empty + val dmSchemaOp = DataMapStoreManager.getInstance().getAllDataMap(mainTable).asScala. + find(_.getDataMapSchema.getDataMapName.equalsIgnoreCase(dataMapName)) --- End diff -- This if branch is for dropping index datamap and MV datamap, and can you also add comment for which if branch is for dropping preagg datamap --- |
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/2641#discussion_r210782093 --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/datamap/CarbonDropDataMapCommand.scala --- @@ -116,8 +116,12 @@ case class CarbonDropDataMapCommand( // drop index datamap on the main table --- End diff -- please modify comment if this branch is for dropping MV datamap also --- |
In reply to this post by qiuchenjian-2
Github user Sssan520 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2641#discussion_r210782671 --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/datamap/CarbonDropDataMapCommand.scala --- @@ -116,8 +116,12 @@ case class CarbonDropDataMapCommand( // drop index datamap on the main table --- End diff -- fixed --- |
In reply to this post by qiuchenjian-2
Github user Sssan520 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2641#discussion_r210790498 --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/datamap/CarbonDropDataMapCommand.scala --- @@ -116,8 +116,12 @@ case class CarbonDropDataMapCommand( // drop index datamap on the main table if (mainTable != null && DataMapStoreManager.getInstance().getAllDataMap(mainTable).size() > 0) { - dropDataMapFromSystemFolder(sparkSession) - return Seq.empty + val dmSchemaOp = DataMapStoreManager.getInstance().getAllDataMap(mainTable).asScala. + find(_.getDataMapSchema.getDataMapName.equalsIgnoreCase(dataMapName)) --- End diff -- fixed --- |
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:
https://github.com/apache/carbondata/pull/2641 SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/6286/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2641 Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7934/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2641 Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/6657/ --- |
In reply to this post by qiuchenjian-2
Github user Sssan520 commented on the issue:
https://github.com/apache/carbondata/pull/2641 retest this please --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2641 Build Failed with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7938/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2641 Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/6661/ --- |
In reply to this post by qiuchenjian-2
Github user jackylk commented on the issue:
https://github.com/apache/carbondata/pull/2641 retest this please --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2641 Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/8092/ --- |
Free forum by Nabble | Edit this page |