zzcclp 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_r355808331
##########
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:
it's better to insert long string value, for example: `"123" * 12000`
----------------------------------------------------------------
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