This is an automated email from the ASF dual-hosted git repository.

w41ter pushed a commit to branch fix_partition_range_for_list
in repository https://gitbox.apache.org/repos/asf/doris.git

commit 4125ced7dc8d3c876dac72c7819b260462f7318b
Author: w41ter <maoch...@selectdb.com>
AuthorDate: Thu Dec 19 12:23:26 2024 +0000

    [fix](catelog) Unify partition range string
    
    For range parttion, `getItems().toString()` is equals to `getItemsString`
    , but for list partition, there has a `,` between each item
---
 fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java          | 6 +-----
 .../main/java/org/apache/doris/common/proc/EsPartitionsProcDir.java | 2 +-
 .../main/java/org/apache/doris/common/proc/PartitionsProcDir.java   | 2 +-
 3 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java 
b/fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java
index b3544b4de55..5b943907db8 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java
@@ -6486,11 +6486,7 @@ public class Env {
                 long partitionId = partition.getId();
                 partitionMeta.setId(partitionId);
                 partitionMeta.setName(partition.getName());
-                String partitionRange = "";
-                if (tblPartitionInfo.getType() == PartitionType.RANGE
-                        || tblPartitionInfo.getType() == PartitionType.LIST) {
-                    partitionRange = 
tblPartitionInfo.getItem(partitionId).getItems().toString();
-                }
+                String partitionRange = 
tblPartitionInfo.getPartitionRangeString(partitionId);
                 partitionMeta.setRange(partitionRange);
                 partitionMeta.setVisibleVersion(partition.getVisibleVersion());
                 // partitionMeta.setTemp(partition.isTemp());
diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/common/proc/EsPartitionsProcDir.java
 
b/fe/fe-core/src/main/java/org/apache/doris/common/proc/EsPartitionsProcDir.java
index 87e7fa449f1..ed5cfc18d13 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/common/proc/EsPartitionsProcDir.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/common/proc/EsPartitionsProcDir.java
@@ -93,7 +93,7 @@ public class EsPartitionsProcDir implements ProcDirInterface {
                 }
                 partitionInfo.add(joiner.join(colNames));  // partition key
                 partitionInfo.add(
-                        
rangePartitionInfo.getItem(esShardPartitions.getPartitionId()).getItems().toString());
 // range
+                        
rangePartitionInfo.getItem(esShardPartitions.getPartitionId()).getItemsString());
 // range
                 partitionInfo.add("-");  // dis
                 
partitionInfo.add(esShardPartitions.getShardRoutings().size());  // shards
                 partitionInfo.add(1);  //  replica num
diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/common/proc/PartitionsProcDir.java 
b/fe/fe-core/src/main/java/org/apache/doris/common/proc/PartitionsProcDir.java
index 3c44874cb7d..3ac8b797d64 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/common/proc/PartitionsProcDir.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/common/proc/PartitionsProcDir.java
@@ -323,7 +323,7 @@ public class PartitionsProcDir implements ProcDirInterface {
                     String colNamesStr = joiner.join(colNames);
                     partitionInfo.add(colNamesStr);
                     trow.addToColumnValue(new 
TCell().setStringVal(colNamesStr));
-                    String itemStr = 
tblPartitionInfo.getItem(partitionId).getItems().toString();
+                    String itemStr = 
tblPartitionInfo.getPartitionRangeString(partitionId);
                     partitionInfo.add(itemStr);
                     trow.addToColumnValue(new TCell().setStringVal(itemStr));
                 } else {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to