jaykanakiya commented on code in PR #19198:
URL: https://github.com/apache/druid/pull/19198#discussion_r2977100739


##########
processing/src/main/java/org/apache/druid/data/input/impl/StringDimensionSchema.java:
##########
@@ -34,12 +34,23 @@ public class StringDimensionSchema extends DimensionSchema
 {
   private static final boolean DEFAULT_CREATE_BITMAP_INDEX = true;
 
-  public static int getDefaultMaxStringLength()
+  @Nullable
+  public static Integer getDefaultMaxStringLength()
   {
     return BuiltInTypesModule.getMaxStringLength();
   }
 
-  private final int maxStringLength;
+  @Nullable
+  private static Integer validateMaxStringLength(@Nullable Integer 
maxStringLength)
+  {
+    if (maxStringLength != null && maxStringLength < 0) {
+      throw new IllegalArgumentException("maxStringLength must be >= 0, got " 
+ maxStringLength);

Review Comment:
   Updated to use DruidException and also log column name. 



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to