ajantha-bhat commented on a change in pull request #3509: [CARBONDATA-3618] Update query should throw exception if key has more than one value
URL:
https://github.com/apache/carbondata/pull/3509#discussion_r360681247
##########
File path: integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/iud/UpdateCarbonTableTestCase.scala
##########
@@ -96,6 +96,25 @@ class UpdateCarbonTableTestCase extends QueryTest with BeforeAndAfterAll {
sql("""drop table if exists iud.dest22""")
}
+ test("update with subquery with more than one value for key") {
+ sql("drop table if exists t1")
+ sql("drop table if exists t2")
+ sql("create table t1 (age int, name string) stored by 'carbondata'")
+ sql("insert into t1 select 1, 'aa'")
+ sql("insert into t1 select 2, 'aa'")
+ sql("create table t2 (age int, name string) stored by 'carbondata'")
+ sql("insert into t2 select 1, 'Andy'")
+ sql("insert into t2 select 2, 'Andy'")
+ val exception = intercept[RuntimeException] {
+ sql("update t1 set (age) = (select t2.age from t2 where t2.name = 'Andy') where t1.age = 1 ").show(false)
Review comment:
added carbon property, updated document and test case
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[hidden email]
With regards,
Apache Git Services