mcvsubbu commented on a change in pull request #6541: URL: https://github.com/apache/incubator-pinot/pull/6541#discussion_r586720500
########## File path: pinot-core/src/main/java/org/apache/pinot/core/util/TableConfigUtils.java ########## @@ -488,18 +529,35 @@ private static void validateFieldConfigList(@Nullable List<FieldConfig> fieldCon for (FieldConfig fieldConfig : fieldConfigList) { String columnName = fieldConfig.getName(); - Preconditions.checkState(schema.getFieldSpecFor(columnName) != null, + FieldSpec fieldConfigColSpec = schema.getFieldSpecFor(columnName); + Preconditions.checkState(fieldConfigColSpec != null, "Column Name " + columnName + " defined in field config list must be a valid column defined in the schema"); - if (fieldConfig.getEncodingType() == FieldConfig.EncodingType.DICTIONARY && - indexingConfigs.getNoDictionaryColumns() != null) { - Preconditions.checkArgument(!indexingConfigs.getNoDictionaryColumns().contains(columnName), - "FieldConfig encoding type is different from indexingConfig for column: " + columnName); + List<String> noDictionaryColumns = indexingConfigs.getNoDictionaryColumns(); + switch (fieldConfig.getEncodingType()) { + case RAW: + Preconditions.checkState(noDictionaryColumns != null && noDictionaryColumns.contains(columnName), Review comment: This check seems to be a needless one, given that we are in the case `RAW`. @icefury71 the new `FieldConfig` is where we want to move things, and eventually drop arrays in table config like `invertedIndexColumns`, and `noDictionaryColumns` etc. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org