You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2021/10/29 01:24:43 UTC

[GitHub] [pinot] walterddr commented on a change in pull request #7648: fix fieldConfig nullable fields failed validation

walterddr commented on a change in pull request #7648:
URL: https://github.com/apache/pinot/pull/7648#discussion_r738873878



##########
File path: pinot-segment-local/src/main/java/org/apache/pinot/segment/local/utils/TableConfigUtils.java
##########
@@ -655,35 +655,39 @@ private static void validateFieldConfigList(@Nullable List<FieldConfig> fieldCon
       Preconditions.checkState(fieldConfigColSpec != null,
           "Column Name " + columnName + " defined in field config list must be a valid column defined in the schema");
 
-      List<String> noDictionaryColumns = indexingConfigs.getNoDictionaryColumns();
-      switch (fieldConfig.getEncodingType()) {
-        case DICTIONARY:
-          if (noDictionaryColumns != null) {
-            Preconditions.checkArgument(!noDictionaryColumns.contains(columnName),
-                "FieldConfig encoding type is different from indexingConfig for column: " + columnName);
-          }
-          Preconditions.checkArgument(fieldConfig.getCompressionCodec() == null,
-              "Set compression codec to null for dictionary encoding type");
-          break;
-        default:
-          break;
+      if (fieldConfig.getEncodingType() != null && indexingConfigs != null) {

Review comment:
       it felt like to me we should make a default encodingType = DICTIONARY if it is null. for backward compatible consideration since some JSON might've encodingType as null but indexing type as INVERTED?




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org