Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2639,7 +2639,7 @@ public class Config extends ConfigBase {
public static long analyze_record_limit = 20000;

@ConfField(mutable = true, masterOnly = true, description = {"Minimum number of buckets for auto bucketing."})
public static int autobucket_min_buckets = 1;
public static int autobucket_min_buckets = 3;
Comment thread
deardeng marked this conversation as resolved.

@ConfField(mutable = true, masterOnly = true, description = {"Maximum number of buckets for auto bucketing."})
public static int autobucket_max_buckets = 128;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1835,7 +1835,7 @@ public void testAutoBuckets() throws Exception {
partitions = Lists.newArrayList(table.getAllPartitions());
partitions.sort(Comparator.comparing(Partition::getId));
Assert.assertEquals(53, partitions.size());
Assert.assertEquals(1, partitions.get(partitions.size() - 1).getDistributionInfo().getBucketNum());
Assert.assertEquals(3, partitions.get(partitions.size() - 1).getDistributionInfo().getBucketNum());
Config.autobucket_out_of_bounds_percent_threshold = 0.5;

table.readLock();
Expand Down Expand Up @@ -1887,7 +1887,7 @@ public void testAutoBuckets() throws Exception {
if (i < 52) {
Assert.assertEquals(10, idx.getTablets().size());
} else if (i == 52) {
Assert.assertEquals(1, idx.getTablets().size());
Assert.assertEquals(3, idx.getTablets().size());
} else if (i == 53) {
Assert.assertEquals(20, idx.getTablets().size());
}
Expand Down
4 changes: 2 additions & 2 deletions regression-test/suites/autobucket/test_autobucket.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ suite("test_autobucket") {
// XXX: buckets at pos(8), next maybe impl by sql meta
assertEquals(5, Integer.valueOf(result.get(0).Buckets))
// set back to default
sql "ADMIN SET FRONTEND CONFIG ('autobucket_min_buckets' = '1')"
sql "ADMIN SET FRONTEND CONFIG ('autobucket_min_buckets' = '3')"
sql "drop table if exists autobucket_test_min_buckets"

// set max to 1
Expand All @@ -84,7 +84,7 @@ suite("test_autobucket") {
result = sql_return_maparray "show partitions from autobucket_test_max_buckets"
logger.info("${result}")
// XXX: buckets at pos(8), next maybe impl by sql meta
assertEquals(1, Integer.valueOf(result.get(0).Buckets)) //equals max bucket
assertEquals(3, Integer.valueOf(result.get(0).Buckets)) //equals max bucket
// set back to default
sql "ADMIN SET FRONTEND CONFIG ('autobucket_max_buckets' = '128')"
sql "drop table if exists autobucket_test_max_buckets"
Expand Down
Loading