[GitHub] [carbondata] ajantha-bhat commented on a change in pull request #3504: [CARBONDATA-3614] Support Alter table properties set/unset for longstring columns

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] ajantha-bhat commented on a change in pull request #3504: [CARBONDATA-3614] Support Alter table properties set/unset for longstring columns

GitBox
ajantha-bhat commented on a change in pull request #3504: [CARBONDATA-3614] Support Alter table properties set/unset for longstring columns
URL: https://github.com/apache/carbondata/pull/3504#discussion_r355808850
 
 

 ##########
 File path: integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/longstring/VarcharDataTypesBasicTestCase.scala
 ##########
 @@ -191,6 +191,29 @@ class VarcharDataTypesBasicTestCase extends QueryTest with BeforeAndAfterEach wi
     assert(exceptionCaught.getMessage.contains("both in no_inverted_index and long_string_columns"))
   }
 
+  test("test alter table add long string columns with local dictionary") {
+    sql("drop table if exists testlongstring")
+    sql(
+      s"""
+         | CREATE TABLE if not exists testlongstring(id INT, name STRING, description STRING
+         | ) STORED BY 'carbondata'
+         |""".stripMargin)
+    sql("insert into testlongstring select 1, 'ab', 'cool'")
+    checkAnswer(sql("select * from testlongstring"), Seq(Row(1, "ab", "cool")))
+    checkExistence(sql("describe formatted testlongstring"), false, "long_string_columns")
+    //Alter table add table property of long string columns
+    sql("ALTER TABLE testlongstring SET TBLPROPERTIES('long_String_columns'='name,description')")
+    sql("insert into testlongstring select 1, 'ab1', 'not cool'")
 
 Review comment:
   I have verified with long string, generating longstring also takes some time. so I didn't wanted to impact CI running time and adding validation is difficult.
   
   

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