Github user akashrn5 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2390#discussion_r197020746
--- Diff:
integration/spark-common/src/main/scala/org/apache/spark/sql/catalyst/CarbonDDLSqlParser.scala
---
@@ -444,16 +476,30 @@ abstract class CarbonDDLSqlParser extends
AbstractCarbonSparkSQLParser {
throw new MalformedCarbonCommandException(errormsg)
}
}
+
+ // Validate whether any of the child columns of complex dataType
column is a string column
+ localDictColumns.foreach { dictColm =>
+ if (fields
+ .exists(x => x.column.equalsIgnoreCase(dictColm) &&
x.children.isDefined &&
+ null != x.children.get &&
+ !validateChildColumns(x))) {
+ val errMsg = "No child column is string dataType column in
local_dictionary_include."
+ throw new MalformedCarbonCommandException(errMsg)
+ }
+ }
+
// check if the same column is present in both dictionary include and
local dictionary columns
// configuration
if
(tableProperties.get(CarbonCommonConstants.DICTIONARY_INCLUDE).isDefined) {
+ val dictExcludeCoumns =
tableProperties.get(CarbonCommonConstants.LOCAL_DICTIONARY_EXCLUDE)
--- End diff --
remove this check, because if same column is contained in dictioanry
include, local dictionary include, local dictionary exclude, any two will be
validated and error will be thrown, better not to check all the three properties
---