You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by Sssan520 <gi...@git.apache.org> on 2018/08/16 08:04:14 UTC

[GitHub] carbondata pull request #2641: [CARBONDATA-2819] Fixed cannot drop preagg da...

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 <li...@...>
Date:   2018-07-02T11:12:24Z

    [CARBONDATA-2819] Fixed cannot drop preagg datamap on table if the table has other type datamaps

----


---

[GitHub] carbondata issue #2641: [CARBONDATA-2819] Fixed cannot drop preagg datamap o...

Posted by jackylk <gi...@git.apache.org>.
Github user jackylk commented on the issue:

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


---

[GitHub] carbondata issue #2641: [CARBONDATA-2819] Fixed cannot drop preagg datamap o...

Posted by CarbonDataQA <gi...@git.apache.org>.
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/



---

[GitHub] carbondata issue #2641: [CARBONDATA-2819] Fixed cannot drop preagg datamap o...

Posted by Sssan520 <gi...@git.apache.org>.
Github user Sssan520 commented on the issue:

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


---

[GitHub] carbondata pull request #2641: [CARBONDATA-2819] Fixed cannot drop preagg da...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

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


---

[GitHub] carbondata issue #2641: [CARBONDATA-2819] Fixed cannot drop preagg datamap o...

Posted by Sssan520 <gi...@git.apache.org>.
Github user Sssan520 commented on the issue:

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


---

[GitHub] carbondata issue #2641: [CARBONDATA-2819] Fixed cannot drop preagg datamap o...

Posted by CarbonDataQA <gi...@git.apache.org>.
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/



---

[GitHub] carbondata pull request #2641: [CARBONDATA-2819] Fixed cannot drop preagg da...

Posted by jackylk <gi...@git.apache.org>.
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


---

[GitHub] carbondata issue #2641: [CARBONDATA-2819] Fixed cannot drop preagg datamap o...

Posted by ravipesala <gi...@git.apache.org>.
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/



---

[GitHub] carbondata pull request #2641: [CARBONDATA-2819] Fixed cannot drop preagg da...

Posted by jackylk <gi...@git.apache.org>.
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


---

[GitHub] carbondata issue #2641: [CARBONDATA-2819] Fixed cannot drop preagg datamap o...

Posted by jackylk <gi...@git.apache.org>.
Github user jackylk commented on the issue:

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


---

[GitHub] carbondata issue #2641: [CARBONDATA-2819] Fixed cannot drop preagg datamap o...

Posted by CarbonDataQA <gi...@git.apache.org>.
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/



---

[GitHub] carbondata issue #2641: [CARBONDATA-2819] Fixed cannot drop preagg datamap o...

Posted by Sssan520 <gi...@git.apache.org>.
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


---

[GitHub] carbondata issue #2641: [CARBONDATA-2819] Fixed cannot drop preagg datamap o...

Posted by CarbonDataQA <gi...@git.apache.org>.
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/



---

[GitHub] carbondata pull request #2641: [CARBONDATA-2819] Fixed cannot drop preagg da...

Posted by jackylk <gi...@git.apache.org>.
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


---

[GitHub] carbondata pull request #2641: [CARBONDATA-2819] Fixed cannot drop preagg da...

Posted by jackylk <gi...@git.apache.org>.
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?


---

[GitHub] carbondata issue #2641: [CARBONDATA-2819] Fixed cannot drop preagg datamap o...

Posted by ravipesala <gi...@git.apache.org>.
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/



---

[GitHub] carbondata pull request #2641: [CARBONDATA-2819] Fixed cannot drop preagg da...

Posted by Sssan520 <gi...@git.apache.org>.
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


---

[GitHub] carbondata pull request #2641: [CARBONDATA-2819] Fixed cannot drop preagg da...

Posted by Sssan520 <gi...@git.apache.org>.
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


---

[GitHub] carbondata issue #2641: [CARBONDATA-2819] Fixed cannot drop preagg datamap o...

Posted by CarbonDataQA <gi...@git.apache.org>.
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/



---

[GitHub] carbondata issue #2641: [CARBONDATA-2819] Fixed cannot drop preagg datamap o...

Posted by CarbonDataQA <gi...@git.apache.org>.
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/



---

[GitHub] carbondata issue #2641: [CARBONDATA-2819] Fixed cannot drop preagg datamap o...

Posted by CarbonDataQA <gi...@git.apache.org>.
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://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/32/



---

[GitHub] carbondata issue #2641: [CARBONDATA-2819] Fixed cannot drop preagg datamap o...

Posted by CarbonDataQA <gi...@git.apache.org>.
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/



---