[GitHub] carbondata pull request #1564: [CARBONDATA-1610] Reject alter table to disab...

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1564: [CARBONDATA-1610] Reject alter table to disab...

qiuchenjian-2
GitHub user QiangCai opened a pull request:

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

    [CARBONDATA-1610] Reject alter table to disable streaming property

    1. unsupported
    ALTER TABLE stream_table_alter UNSET TBLPROPERTIES IF EXISTS ('streaming')
    ALTER TABLE stream_table_alter SET TBLPROPERTIES('streaming'='false')
   
    2. supported
    ALTER TABLE stream_table_alter SET TBLPROPERTIES('streaming'='true')
   
     - [x] Any interfaces changed?
     no
     - [x] Any backward compatibility impacted?
     no
     - [x] Document update required?
    no
     - [ x] Testing done
            Please provide details on
            - Whether new unit test cases have been added or why no new tests are required?
              yes
            - How it is tested? Please attach test report.
             tested
            - Is it a performance related change? Please attach the performance test report.
              no
            - Any additional information to help reviewers in testing this change.
              yes
     - [x] 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/QiangCai/carbondata reject_alter_streaming

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/carbondata/pull/1564.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 #1564
   
----
commit 868a1b5e3f5bc23d500d28ad827d3e438a1a82fe
Author: QiangCai <[hidden email]>
Date:   2017-11-24T11:38:01Z

    reject alter table to disable streaming property

----


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1564: [CARBONDATA-1610][Streaming] Reject alter table to d...

qiuchenjian-2
Github user QiangCai commented on the issue:

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


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1564: [CARBONDATA-1610][Streaming] Reject alter table to d...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1564
 
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/1434/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1564: [CARBONDATA-1610][Streaming] Reject alter table to d...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user jackylk commented on the issue:

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


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1564: [CARBONDATA-1610][Streaming] Reject alter tab...

qiuchenjian-2
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/1564#discussion_r153036536
 
    --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/strategy/DDLStrategy.scala ---
    @@ -156,11 +156,22 @@ class DDLStrategy(sparkSession: SparkSession) extends SparkStrategy {
           case AlterTableSetPropertiesCommand(tableName, properties, isView)
             if CarbonEnv.getInstance(sparkSession).carbonMetastore
               .tableExists(tableName)(sparkSession) => {
    +        val property = properties.find(_._1.equalsIgnoreCase("streaming"))
    +        if (property.isDefined) {
    +          if (!property.get._2.trim.equalsIgnoreCase("true")) {
    +            throw new MalformedCarbonCommandException(
    +              "Unsupported alter table to disable streaming property")
    --- End diff --
   
    Suggest change to `Streaming property can not be changed to 'false' once it is 'true'`


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1564: [CARBONDATA-1610][Streaming] Reject alter tab...

qiuchenjian-2
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/1564#discussion_r153036540
 
    --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/strategy/DDLStrategy.scala ---
    @@ -156,11 +156,22 @@ class DDLStrategy(sparkSession: SparkSession) extends SparkStrategy {
           case AlterTableSetPropertiesCommand(tableName, properties, isView)
             if CarbonEnv.getInstance(sparkSession).carbonMetastore
               .tableExists(tableName)(sparkSession) => {
    +        val property = properties.find(_._1.equalsIgnoreCase("streaming"))
    +        if (property.isDefined) {
    +          if (!property.get._2.trim.equalsIgnoreCase("true")) {
    +            throw new MalformedCarbonCommandException(
    +              "Unsupported alter table to disable streaming property")
    --- End diff --
   
    And please add a TODO to mark we will remove this limitation later


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1564: [CARBONDATA-1610][Streaming] Reject alter tab...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user QiangCai commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1564#discussion_r153036781
 
    --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/strategy/DDLStrategy.scala ---
    @@ -156,11 +156,22 @@ class DDLStrategy(sparkSession: SparkSession) extends SparkStrategy {
           case AlterTableSetPropertiesCommand(tableName, properties, isView)
             if CarbonEnv.getInstance(sparkSession).carbonMetastore
               .tableExists(tableName)(sparkSession) => {
    +        val property = properties.find(_._1.equalsIgnoreCase("streaming"))
    +        if (property.isDefined) {
    +          if (!property.get._2.trim.equalsIgnoreCase("true")) {
    +            throw new MalformedCarbonCommandException(
    +              "Unsupported alter table to disable streaming property")
    --- End diff --
   
    fixed


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1564: [CARBONDATA-1610][Streaming] Reject alter table to d...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/1564
 
    SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/1864/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1564: [CARBONDATA-1610][Streaming] Reject alter table to d...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1564
 
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/1443/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1564: [CARBONDATA-1610][Streaming] Reject alter table to d...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user jackylk commented on the issue:

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


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1564: [CARBONDATA-1610][Streaming] Reject alter tab...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user asfgit closed the pull request at:

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


---