Github user kunal642 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2390#discussion_r197028165
--- Diff:
integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/localdictionary/LocalDictionarySupportCreateTableTest.scala
---
@@ -2096,6 +2093,194 @@ class LocalDictionarySupportCreateTableTest extends
QueryTest with BeforeAndAfte
}
}
+ test(
+ "test local dictionary custom configurations when complex dataType
columns are given in " +
+ "local_dictionary_include _001")
+ {
+ sql("drop table if exists local1")
+ val exception = intercept[MalformedCarbonCommandException] {
+ sql(
+ """
+ | CREATE TABLE local1(id int, name string,city array<int>, st
array<struct<i:int,s:int>>)
+ | STORED BY 'org.apache.carbondata.format'
+ |
tblproperties('local_dictionary_enable'='true','local_dictionary_include'='name,st')
+ """.stripMargin)
+ }
+ assert(exception.getMessage
+ .contains(
+ "Child columns do not exist for the specified complex dataType
column(s) in local_dictionary_include."))
+ }
+
+ test(
+ "test local dictionary custom configurations when complex dataType
columns are given in " +
+ "local_dictionary_include _002")
+ {
+ sql("drop table if exists local1")
+ val exception = intercept[MalformedCarbonCommandException] {
+ sql(
+ """
+ | CREATE TABLE local1(id int, name string,city array<int>, st
string)
+ | STORED BY 'org.apache.carbondata.format'
+ |
tblproperties('local_dictionary_enable'='true','local_dictionary_include'='name,st,city')
+ """.stripMargin)
+ }
+ assert(exception.getMessage
+ .contains(
+ "Child columns do not exist for the specified complex dataType
column(s) in local_dictionary_include."))
+ }
+
+ test(
--- End diff --
i think local_dictionary_include _001 has already covered this scenario.
Please remove all duplicate test cases.
---