PCloud63514 commented on code in PR #9189:
URL: https://github.com/apache/gravitino/pull/9189#discussion_r2546218894


##########
catalogs/catalog-jdbc-doris/src/main/java/org/apache/gravitino/catalog/doris/utils/DorisUtils.java:
##########
@@ -223,10 +223,10 @@ public static Distribution 
extractDistributionInfoFromSql(String createTableSql)
   private static int extractBucketNum(Matcher matcher) {
     int bucketNum = 1;
     if (matcher.group(4) != null) {
-      String bucketValue = matcher.group(4);
+      String bucketValue = matcher.group(4).trim();
       // Use -1 to indicate auto bucket.
       bucketNum =
-          bucketValue.trim().toUpperCase().equals("AUTO")

Review Comment:
   > I can't see any difference here? Could you make it clearer?
   
   I believe the issue is that trim() is only being applied for the AUTO check 
(line 229).
   
   When it's a number (line 231), the original, untrimmed bucketValue is used, 
which causes the NumberFormatException if there's whitespace.



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

Reply via email to