Login  Register

[GitHub] [carbondata] Indhumathi27 commented on a change in pull request #4138: [CARBONDATA-4189] alter table validation issues

Posted by GitBox on May 20, 2021; 5:16pm
URL: http://apache-carbondata-dev-mailing-list-archive.168.s1.nabble.com/GitHub-carbondata-maheshrajus-opened-a-new-pull-request-4138-CARBONDATA-4189-alter-table-validation-s-tp108243p108323.html


Indhumathi27 commented on a change in pull request #4138:
URL: https://github.com/apache/carbondata/pull/4138#discussion_r636304620



##########
File path: integration/spark/src/test/scala/org/apache/spark/carbondata/restructure/AlterTableValidationTestCase.scala
##########
@@ -812,6 +812,56 @@ test("test alter command for boolean data type with correct default measure valu
     sql("DROP TABLE t1")
   }
 
+  test("testing the duplicate add columns for complex data types") {
+    sql("drop table if exists alter_complex")
+    sql("create table alter_complex (a int, b string, arr1 array<int>) " +
+        "stored as carbondata")
+    var exception = intercept[ProcessMetaDataException] {
+      sql("alter table alter_complex add columns(arr1 array<int>)")
+    }
+    assert(exception.getMessage

Review comment:
       This assertion looks duplicate for below code. Can refactor the code, by creating variable errMsg and can directly check intercept[] {}.getmessage.contains(errMsg)




--
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]