tibrewalpratik17 commented on code in PR #13187:
URL: https://github.com/apache/pinot/pull/13187#discussion_r1629984437


##########
pinot-segment-spi/src/main/java/org/apache/pinot/segment/spi/index/metadata/ColumnMetadataImpl.java:
##########
@@ -229,11 +229,17 @@ public static ColumnMetadataImpl 
fromPropertiesConfiguration(String column, Prop
     if (defaultNullValueString != null && storedType == DataType.STRING) {
       defaultNullValueString = 
CommonsConfigurationUtils.recoverSpecialCharacterInPropertyValue(defaultNullValueString);
     }
+    int maxLength = config.getInt(Column.getKeyFor(column, 
Column.SCHEMA_MAX_LENGTH), FieldSpec.DEFAULT_MAX_LENGTH);
+    String maxLengthExceedStrategyString =
+        config.getString(Column.getKeyFor(column, 
Column.SCHEMA_MAX_LENGTH_EXCEED_STRATEGY), null);
+    FieldSpec.MaxLengthExceedStrategy maxLengthExceedStrategy = 
maxLengthExceedStrategyString != null
+        ? 
FieldSpec.MaxLengthExceedStrategy.valueOf(maxLengthExceedStrategyString) : null;
     FieldSpec fieldSpec;
     switch (fieldType) {
       case DIMENSION:
         boolean isSingleValue = config.getBoolean(Column.getKeyFor(column, 
Column.IS_SINGLE_VALUED));
-        fieldSpec = new DimensionFieldSpec(column, dataType, isSingleValue, 
defaultNullValueString);
+        fieldSpec = new DimensionFieldSpec(column, dataType, isSingleValue, 
maxLength,
+            defaultNullValueString, maxLengthExceedStrategy);
         break;
       case METRIC:
         fieldSpec = new MetricFieldSpec(column, dataType, 
defaultNullValueString);

Review Comment:
   I see the constructor was missing in MetricFieldSpec so added that as well



-- 
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-unsubscr...@pinot.apache.org

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

Reply via email to