Jackie-Jiang commented on code in PR #13187: URL: https://github.com/apache/pinot/pull/13187#discussion_r1629874567
########## 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: This also applies to metric columns -- 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