good first issueimprovement
Metriche repository
- Star
- (3058 star)
- Metriche merge PR
- (Metriche PR in attesa)
Descrizione
What would you like to be improved?
In catalogs/catalog-jdbc-doris/src/main/java/org/apache/gravitino/catalog/doris/utils/DorisUtils.java, checks for a missing bucket group, preventing errors when the BUCKETS clause is absent and defaulting to 1 or AUTO as appropriate.
Here's a test to help:
@Test
public void testDistributionWithoutBucketClauseDefaultsToOne() {
String createTableSql =
"CREATE TABLE `testTable` (\n" +
"`col1` date NOT NULL\n) ENGINE=OLAP\n PARTITION BY RANGE(`col1`)\n()\n DISTRIBUTED BY HASH(`col1` )";
Distribution distribution = DorisUtils.extractDistributionInfoFromSql(createTableSql);
assertEquals(distribution.number(), 1);
}
How should we improve?
see above