sunxiaojian commented on code in PR #7186:
URL: https://github.com/apache/gravitino/pull/7186#discussion_r2104778045
##########
catalogs/catalog-jdbc-doris/src/main/java/org/apache/gravitino/catalog/doris/utils/DorisUtils.java:
##########
@@ -220,4 +217,26 @@ public static Distribution
extractDistributionInfoFromSql(String createTableSql)
throw new RuntimeException("Failed to extract distribution info in sql:" +
createTableSql);
}
+
+ private static int extractBucketNum(Matcher matcher) {
+ int bucketNum = 1;
+ if (matcher.find(5)) {
+ String bucketValue = matcher.group(5);
+ if (bucketValue.trim().toUpperCase().equals("AUTO")) {
+ // Use -1 to indicate auto bucket.
+ bucketNum = -1;
+ } else {
+ bucketNum = Integer.valueOf(matcher.group(5));
+ }
+ }
+ return bucketNum;
+ }
+
+ public static String revertDistributionBucket(int number) {
Review Comment:
@mchades @yuqi1129 PTAL, thanks.
--
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]