justinmclean opened a new issue, #8006:
URL: https://github.com/apache/gravitino/issues/8006

   ### What would you like to be improved?
   
   
   There are some issues with parsing the bucket count in 
catalogs/catalog-jdbc-doris/src/main/java/org/apache/gravitino/catalog/doris/utils/DorisUtils.java
   
   You can see this by running this test:
   ```
     @Test
     public void testExtractBucketNumFromSql() {
       String createTableSql =
           "CREATE TABLE `testTable` (\n`col1` int NOT NULL\n) ENGINE=OLAP\n 
DISTRIBUTED BY HASH(`col1`) BUCKETS 8";
       Distribution distribution = 
DorisUtils.extractDistributionInfoFromSql(createTableSql);
       assertEquals(8, distribution.number());
   
       String createTableSqlWithoutBucket =
           "CREATE TABLE `testTable` (\n`col1` int NOT NULL\n) ENGINE=OLAP\n 
DISTRIBUTED BY HASH(`col1`)";
       Distribution distributionDefault =
           
DorisUtils.extractDistributionInfoFromSql(createTableSqlWithoutBucket);
       assertEquals(1, distributionDefault.number());
     }
   ```
   
   ### How should we improve?
   
   Fix the code so the test passes.


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