You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by akashrn5 <gi...@git.apache.org> on 2018/07/10 08:54:38 UTC
[GitHub] carbondata pull request #2469: [CARBONDATA-2712] Added fix for Local Diction...
Github user akashrn5 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2469#discussion_r201264110
--- Diff: integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/localdictionary/LocalDictionarySupportAlterTableTest.scala ---
@@ -1161,6 +1159,126 @@ class LocalDictionarySupportAlterTableTest extends QueryTest with BeforeAndAfter
}
}
+ test("test alter for local dictionary for complex columns when local dictionary exclude is defined _001") {
+ sql("drop table if exists local1")
+ sql(
+ """
+ | CREATE TABLE local1(id int, name string,city string, st array<struct<si:int,sd:string>>)
+ | STORED BY 'org.apache.carbondata.format'
+ | tblproperties('long_string_columns'='name','local_dictionary_enable'='true')
+ """.stripMargin)
+ sql("alter table local1 set tblproperties('local_dictionary_exclude'='st,name')")
+ val descLoc = sql("describe formatted local1").collect
+ descLoc.find(_.get(0).toString.contains("Local Dictionary Threshold")) match {
+ case Some(row) => assert(row.get(1).toString.contains("10000"))
+ }
+ descLoc.find(_.get(0).toString.contains("Local Dictionary Enabled")) match {
+ case Some(row) => assert(row.get(1).toString.contains("true"))
+ }
+ descLoc.find(_.get(0).toString.contains("Local Dictionary Exclude")) match {
+ case Some(row) => assert(row.get(1).toString.contains("st.val.sd,name"))
--- End diff --
Local Dictionary Excludem should contain child columns sd and si , both right?
---