Github user ravipesala commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/2375#discussion_r196308657
  
    --- 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))) 
{
    --- End diff --
    
    You can directly use 
    ```
    Try(tableProperties(CarbonCommonConstants.LOCAL_DICT_ENABLE).toBoolean) 
match {
      case Success(value) => 
     case Failure(e) =>
    }
    ```


---

Reply via email to