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

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


The following commit(s) were added to refs/heads/master by this push:
     new 37c2a6ff6c5 [enhance](systable)Improve remote_data_size for partitions 
table (#51519)
37c2a6ff6c5 is described below

commit 37c2a6ff6c5e2e4aea46b90dc29c8c02722dd43b
Author: koarz <[email protected]>
AuthorDate: Tue Jun 17 15:35:28 2025 +0800

    [enhance](systable)Improve remote_data_size for partitions table (#51519)
---
 .../exec/schema_scanner/schema_partitions_scanner.cpp |   3 ++-
 .../java/org/apache/doris/catalog/SchemaTable.java    |   3 ++-
 .../apache/doris/tablefunction/MetadataGenerator.java |   6 +++++-
 .../data/query_p0/system/test_query_sys_tables.out    | Bin 6108 -> 6150 bytes
 4 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/be/src/exec/schema_scanner/schema_partitions_scanner.cpp 
b/be/src/exec/schema_scanner/schema_partitions_scanner.cpp
index ca4768753f1..0c16e9cf864 100644
--- a/be/src/exec/schema_scanner/schema_partitions_scanner.cpp
+++ b/be/src/exec/schema_scanner/schema_partitions_scanner.cpp
@@ -66,7 +66,8 @@ std::vector<SchemaScanner::ColumnDesc> 
SchemaPartitionsScanner::_s_tbls_columns
         {"PARTITION_COMMENT", TYPE_STRING, sizeof(StringRef), false},
         {"NODEGROUP", TYPE_VARCHAR, sizeof(StringRef), true},
         {"TABLESPACE_NAME", TYPE_VARCHAR, sizeof(StringRef), true},
-        {"DATA_SIZE", TYPE_STRING, sizeof(StringRef), true},
+        {"LOCAL_DATA_SIZE", TYPE_STRING, sizeof(StringRef), true},
+        {"REMOTE_DATA_SIZE", TYPE_STRING, sizeof(StringRef), true},
         {"STATE", TYPE_STRING, sizeof(StringRef), true},
         {"REPLICA_ALLOCATION", TYPE_STRING, sizeof(StringRef), true},
         {"REPLICA_NUM", TYPE_INT, sizeof(int32_t), true},
diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/SchemaTable.java 
b/fe/fe-core/src/main/java/org/apache/doris/catalog/SchemaTable.java
index d4212044ddb..57ff2ef563a 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/catalog/SchemaTable.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/SchemaTable.java
@@ -324,7 +324,8 @@ public class SchemaTable extends Table {
                                     .column("PARTITION_COMMENT", 
ScalarType.createStringType())
                                     .column("NODEGROUP", 
ScalarType.createVarchar(256))
                                     .column("TABLESPACE_NAME", 
ScalarType.createVarchar(268))
-                                    .column("DATA_SIZE", 
ScalarType.createStringType())
+                                    .column("LOCAL_DATA_SIZE", 
ScalarType.createStringType())
+                                    .column("REMOTE_DATA_SIZE", 
ScalarType.createStringType())
                                     .column("STATE", 
ScalarType.createStringType())
                                     .column("REPLICA_ALLOCATION", 
ScalarType.createStringType())
                                     .column("REPLICA_NUM", 
ScalarType.createType(PrimitiveType.INT))
diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/tablefunction/MetadataGenerator.java
 
b/fe/fe-core/src/main/java/org/apache/doris/tablefunction/MetadataGenerator.java
index e2fd6311ac0..a6fea38cb40 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/tablefunction/MetadataGenerator.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/tablefunction/MetadataGenerator.java
@@ -1479,7 +1479,11 @@ public class MetadataGenerator {
                     Pair<Double, String> sizePair = 
DebugUtil.getByteUint(partition.getDataSize(false));
                     String readableDateSize = 
DebugUtil.DECIMAL_FORMAT_SCALE_3.format(sizePair.first) + " "
                             + sizePair.second;
-                    trow.addToColumnValue(new 
TCell().setStringVal(readableDateSize));  // DATA_SIZE
+                    trow.addToColumnValue(new 
TCell().setStringVal(readableDateSize));  // LOCAL_DATA_SIZE
+                    sizePair = 
DebugUtil.getByteUint(partition.getRemoteDataSize());
+                    readableDateSize = 
DebugUtil.DECIMAL_FORMAT_SCALE_3.format(sizePair.first) + " "
+                            + sizePair.second;
+                    trow.addToColumnValue(new 
TCell().setStringVal(readableDateSize)); // REMOTE_DATA_SIZE
                     trow.addToColumnValue(new 
TCell().setStringVal(partition.getState().toString())); // STATE
                     trow.addToColumnValue(new 
TCell().setStringVal(partitionInfo.getReplicaAllocation(partitionId)
                             .toCreateStmt())); // REPLICA_ALLOCATION
diff --git a/regression-test/data/query_p0/system/test_query_sys_tables.out 
b/regression-test/data/query_p0/system/test_query_sys_tables.out
index d57b2049ccd..b47d2865409 100644
Binary files a/regression-test/data/query_p0/system/test_query_sys_tables.out 
and b/regression-test/data/query_p0/system/test_query_sys_tables.out differ


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to