You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by ndwangsen <gi...@git.apache.org> on 2018/07/11 03:57:54 UTC

[GitHub] carbondata pull request #2483: [CARBONDATA-2719]Table update/delete is neede...

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 <lu...@...>
Date:   2018-07-11T03:52:09Z

    [CARBONDATA-2719]Table update/delete is needed block on table having
    
    datamaps

----


---

[GitHub] carbondata issue #2483: [CARBONDATA-2719][DataMap]Table update/delete is nee...

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

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


---

[GitHub] carbondata pull request #2483: [CARBONDATA-2719][DataMap]Table update/delete...

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


---

[GitHub] carbondata pull request #2483: [CARBONDATA-2719][DataMap]Table update/delete...

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


---

[GitHub] carbondata issue #2483: [CARBONDATA-2719][DataMap]Table update/delete is nee...

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



---

[GitHub] carbondata issue #2483: [CARBONDATA-2719]Table update/delete is needed block...

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



---

[GitHub] carbondata issue #2483: [CARBONDATA-2719]Table update/delete is needed block...

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



---

[GitHub] carbondata pull request #2483: [CARBONDATA-2719][DataMap]Block update and de...

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

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


---

[GitHub] carbondata issue #2483: [CARBONDATA-2719][DataMap]Table update/delete is nee...

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


---

[GitHub] carbondata pull request #2483: [CARBONDATA-2719][DataMap]Table update/delete...

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


---

[GitHub] carbondata issue #2483: [CARBONDATA-2719][DataMap]Table update/delete is nee...

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



---

[GitHub] carbondata issue #2483: [CARBONDATA-2719][DataMap]Table update/delete is nee...

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

    https://github.com/apache/carbondata/pull/2483
  
    modified according to comments


---

[GitHub] carbondata issue #2483: [CARBONDATA-2719][DataMap]Block update and delete on...

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

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


---

[GitHub] carbondata issue #2483: [CARBONDATA-2719]Table update/delete is needed block...

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



---

[GitHub] carbondata issue #2483: [CARBONDATA-2719][DataMap]Table update/delete is nee...

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



---

[GitHub] carbondata pull request #2483: [CARBONDATA-2719][DataMap]Table update/delete...

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


---

[GitHub] carbondata issue #2483: [CARBONDATA-2719][DataMap]Table update/delete is nee...

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

    https://github.com/apache/carbondata/pull/2483
  
    please fix the comments


---