You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by QiangCai <gi...@git.apache.org> on 2017/11/24 11:44:26 UTC
[GitHub] carbondata pull request #1564: [CARBONDATA-1610] Reject alter table to disab...
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 <qi...@qq.com>
Date: 2017-11-24T11:38:01Z
reject alter table to disable streaming property
----
---
[GitHub] carbondata issue #1564: [CARBONDATA-1610][Streaming] Reject alter table to d...
Posted by QiangCai <gi...@git.apache.org>.
Github user QiangCai commented on the issue:
https://github.com/apache/carbondata/pull/1564
retest this please
---
[GitHub] carbondata pull request #1564: [CARBONDATA-1610][Streaming] Reject alter tab...
Posted by jackylk <gi...@git.apache.org>.
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
---
[GitHub] carbondata pull request #1564: [CARBONDATA-1610][Streaming] Reject alter tab...
Posted by QiangCai <gi...@git.apache.org>.
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
---
[GitHub] carbondata issue #1564: [CARBONDATA-1610][Streaming] Reject alter table to d...
Posted by ravipesala <gi...@git.apache.org>.
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/
---
[GitHub] carbondata issue #1564: [CARBONDATA-1610][Streaming] Reject alter table to d...
Posted by CarbonDataQA <gi...@git.apache.org>.
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/
---
[GitHub] carbondata issue #1564: [CARBONDATA-1610][Streaming] Reject alter table to d...
Posted by jackylk <gi...@git.apache.org>.
Github user jackylk commented on the issue:
https://github.com/apache/carbondata/pull/1564
LGTM
---
[GitHub] carbondata issue #1564: [CARBONDATA-1610][Streaming] Reject alter table to d...
Posted by CarbonDataQA <gi...@git.apache.org>.
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/
---
[GitHub] carbondata pull request #1564: [CARBONDATA-1610][Streaming] Reject alter tab...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/carbondata/pull/1564
---
[GitHub] carbondata issue #1564: [CARBONDATA-1610][Streaming] Reject alter table to d...
Posted by jackylk <gi...@git.apache.org>.
Github user jackylk commented on the issue:
https://github.com/apache/carbondata/pull/1564
LGTM
---
[GitHub] carbondata pull request #1564: [CARBONDATA-1610][Streaming] Reject alter tab...
Posted by jackylk <gi...@git.apache.org>.
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'`
---