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

    https://github.com/apache/incubator-carbondata/pull/299#discussion_r87615082
  
    --- Diff: 
integration/spark/src/main/scala/org/apache/carbondata/spark/util/CommonUtil.scala
 ---
    @@ -122,14 +122,29 @@ object CommonUtil {
         var isValid: Boolean = true
         tableProperties.foreach {
           case (key, value) =>
    -        if (!validateFields(key, fields)) {
    +        if (!validateTblOption(key) || !validateFields(key, fields)) {
               isValid = false
               throw new MalformedCarbonCommandException(s"Invalid table 
properties ${ key }")
             }
         }
         isValid
       }
     
    +  def validateTblOption(option: String): Boolean = {
    +    val supportedOptions = Seq[String]("DICTIONARY_EXCLUDE", 
"DICTIONARY_INCLUDE", "COLUMN_GROUPS",
    +      "TABLE_BLOCKSIZE", "NO_INVERTED_INDEX", "PARTITIONCLASS", 
"PARTITIONCOUNT",
    --- End diff --
    
    By this way, it is easy to forget to update this list if later more options 
are added. Better to refactory the options, like make it a Enum, and use it in 
both parser and here


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to