Skip to content

Commit

Permalink
[bugfix](MultiPartition)let the user set the prefix of the MultiParti…
Browse files Browse the repository at this point in the history
…tion (#33820)
  • Loading branch information
felixwluo authored Apr 20, 2024
1 parent bd54a04 commit 76e4c00
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1499,6 +1499,14 @@ public class Config extends ConfigBase {
@ConfField(mutable = true, masterOnly = true)
public static int max_dynamic_partition_num = 500;

/**
* Use this parameter to set the partition name prefix for multi partition,
* Only multi partition takes effect, not dynamic partitions.
* The default prefix is "p_".
*/
@ConfField(mutable = true, masterOnly = true)
public static String multi_partition_name_prefix = "p_";

/**
* Used to limit the maximum number of partitions that can be created when creating multi partition,
* to avoid creating too many partitions at one time.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ public class MultiPartitionDesc implements AllPartitionDesc {



private final String partitionPrefix = "p_";
private LocalDateTime startTime;
private LocalDateTime endTime;

Expand All @@ -72,6 +71,7 @@ public class MultiPartitionDesc implements AllPartitionDesc {
TimestampArithmeticExpr.TimeUnit.YEAR
);

private final String partitionPrefix = Config.multi_partition_name_prefix;
private final Integer maxAllowedLimit = Config.max_multi_partition_num;

public MultiPartitionDesc(PartitionKeyDesc partitionKeyDesc,
Expand Down

0 comments on commit 76e4c00

Please sign in to comment.