Github user ravipesala commented on a diff in the pull request: https://github.com/apache/carbondata/pull/2375#discussion_r196308732 --- Diff: integration/spark-common/src/main/scala/org/apache/spark/sql/catalyst/CarbonDDLSqlParser.scala --- @@ -289,7 +290,79 @@ abstract class CarbonDDLSqlParser extends AbstractCarbonSparkSQLParser { noDictionaryDims, msrs, dims) if (groupCols != null) { throw new MalformedCarbonCommandException( - s"${CarbonCommonConstants.COLUMN_GROUPS} is deprecated") + s"${ CarbonCommonConstants.COLUMN_GROUPS } is deprecated") + } + + // validate the local dictionary property if defined + if (tableProperties.get(CarbonCommonConstants.LOCAL_DICT_ENABLE).isDefined) { + // if any invalid value is configured for LOCAL_DICT_ENABLE, then default value will be + // considered which is true + if (!CarbonScalaUtil + .castStringToBoolean(tableProperties(CarbonCommonConstants.LOCAL_DICT_ENABLE))) { + LOGGER + .debug( + "invalid value is configured for local_dict_enable, considering the defaut value") + tableProperties.put(CarbonCommonConstants.LOCAL_DICT_ENABLE, + CarbonCommonConstants.LOCAL_DICT_ENABLE_DEFAULT) + } + } else { + // if LOCAL_DICT_ENABLE is not defined, consider the default value which is true + tableProperties.put(CarbonCommonConstants.LOCAL_DICT_ENABLE, + CarbonCommonConstants.LOCAL_DICT_ENABLE_DEFAULT) + } + + // validate the local dictionary threshold property if defined + if (tableProperties.get(CarbonCommonConstants.LOCAL_DICT_THRESHOLD).isDefined) { + // if any invalid value is configured for LOCAL_DICT_THRESHOLD, then default value will be + // considered which is 1000 + if (!CarbonScalaUtil.castStringToInt(tableProperties(CarbonCommonConstants + .LOCAL_DICT_THRESHOLD)) || --- End diff -- same as above
---