This is an automated email from the ASF dual-hosted git repository.
dataroaring pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.0 by this push:
new aa4a8af334f [fix](cache) column name of show cache hotspot like other
shows. (#41238)
aa4a8af334f is described below
commit aa4a8af334f87c3489a58e32567b74c84941857d
Author: Yongqiang YANG <[email protected]>
AuthorDate: Wed Sep 25 10:46:35 2024 +0800
[fix](cache) column name of show cache hotspot like other shows. (#41238)
## Proposed changes
---
.../apache/doris/analysis/ShowCacheHotSpotStmt.java | 20 ++++++++++----------
.../warm_up/hotspot/test_warmup_show_stmt_2.groovy | 20 ++++++++++----------
2 files changed, 20 insertions(+), 20 deletions(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/analysis/ShowCacheHotSpotStmt.java
b/fe/fe-core/src/main/java/org/apache/doris/analysis/ShowCacheHotSpotStmt.java
index 2c14a9f8cbb..d02443a050b 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/analysis/ShowCacheHotSpotStmt.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/analysis/ShowCacheHotSpotStmt.java
@@ -43,20 +43,20 @@ import java.util.List;
public class ShowCacheHotSpotStmt extends ShowStmt implements
NotFallbackInParser {
public static final ShowResultSetMetaData[] RESULT_SET_META_DATAS = {
ShowResultSetMetaData.builder()
- .addColumn(new Column("compute_group_id",
ScalarType.createType(PrimitiveType.BIGINT)))
- .addColumn(new Column("compute_group_name",
ScalarType.createVarchar(128)))
- .addColumn(new Column("table_id",
ScalarType.createType(PrimitiveType.BIGINT)))
- .addColumn(new Column("table_name", ScalarType.createVarchar(128)))
+ .addColumn(new Column("ComputeGroupId",
ScalarType.createType(PrimitiveType.BIGINT)))
+ .addColumn(new Column("ComputeGroupName",
ScalarType.createVarchar(128)))
+ .addColumn(new Column("TableId",
ScalarType.createType(PrimitiveType.BIGINT)))
+ .addColumn(new Column("TableName", ScalarType.createVarchar(128)))
.build(),
ShowResultSetMetaData.builder()
- .addColumn(new Column("table_id",
ScalarType.createType(PrimitiveType.BIGINT)))
- .addColumn(new Column("table_name", ScalarType.createVarchar(128)))
- .addColumn(new Column("partition_id",
ScalarType.createType(PrimitiveType.BIGINT)))
- .addColumn(new Column("partition_name",
ScalarType.createVarchar(65535)))
+ .addColumn(new Column("TableId",
ScalarType.createType(PrimitiveType.BIGINT)))
+ .addColumn(new Column("TableName", ScalarType.createVarchar(128)))
+ .addColumn(new Column("PartitionId",
ScalarType.createType(PrimitiveType.BIGINT)))
+ .addColumn(new Column("PartitionName",
ScalarType.createVarchar(65535)))
.build(),
ShowResultSetMetaData.builder()
- .addColumn(new Column("partition_id",
ScalarType.createType(PrimitiveType.BIGINT)))
- .addColumn(new Column("partition_name",
ScalarType.createVarchar(65535)))
+ .addColumn(new Column("PartitionId",
ScalarType.createType(PrimitiveType.BIGINT)))
+ .addColumn(new Column("PartitionName",
ScalarType.createVarchar(65535)))
.build()
};
private int metaDataPos;
diff --git
a/regression-test/suites/cloud_p0/cache/multi_cluster/warm_up/hotspot/test_warmup_show_stmt_2.groovy
b/regression-test/suites/cloud_p0/cache/multi_cluster/warm_up/hotspot/test_warmup_show_stmt_2.groovy
index 0cee4201ebb..6ebe891f5f3 100644
---
a/regression-test/suites/cloud_p0/cache/multi_cluster/warm_up/hotspot/test_warmup_show_stmt_2.groovy
+++
b/regression-test/suites/cloud_p0/cache/multi_cluster/warm_up/hotspot/test_warmup_show_stmt_2.groovy
@@ -85,20 +85,20 @@ suite("test_warmup_show_stmt_2") {
org.junit.Assert.assertTrue("result.size() " + result.size() + " > 0",
result.size() > 0)
def hotTableName =
"regression_test_cloud_p0_cache_multi_cluster_warm_up_hotspot.customer"
for (int i = 0; i < result.size(); ++i) {
- if (!result[i].get("hot_table_name").equals(hotTableName)) {
+ if (!result[i].get("TableName").equals(hotTableName)) {
org.junit.Assert.assertTrue(getLineNumber() + "cannot find
expected cache hotspot ${hotTableName}", result.size() > i + 1)
continue
}
- assertEquals(result[i].get("compute_group_id"),
"regression_cluster_id0")
- assertEquals(result[i].get("compute_group_name"),
"regression_cluster_name0")
- assertEquals(result[i].get("hot_table_name"),
"regression_test_cloud_p0_cache_multi_cluster_warm_up_hotspot.customer")
+ assertEquals(result[i].get("ComputeGroupId"), "regression_cluster_id0")
+ assertEquals(result[i].get("ComputeGroupName"),
"regression_cluster_name0")
+ assertEquals(result[i].get("TableName"),
"regression_test_cloud_p0_cache_multi_cluster_warm_up_hotspot.customer")
}
result = sql_return_maparray """ show cache hotspot
"/regression_cluster_name0" """
log.info(result.toString())
org.junit.Assert.assertTrue(getLineNumber() + "result.size() " +
result.size() + " > 0", result.size() > 0)
- assertEquals(result[0].get("hot_partition_name"), "p3")
- assertEquals(result[0].get("table_name"),
"regression_test_cloud_p0_cache_multi_cluster_warm_up_hotspot.customer")
+ assertEquals(result[0].get("PartitionName"), "p3")
+ assertEquals(result[0].get("TableName"),
"regression_test_cloud_p0_cache_multi_cluster_warm_up_hotspot.customer")
// result = sql_return_maparray """ show cache hotspot
"/regression_cluster_name1" """
// assertEquals(result.size(), 0);
// not queried table should not be the hotspot
@@ -112,13 +112,13 @@ suite("test_warmup_show_stmt_2") {
log.info(result.toString())
org.junit.Assert.assertTrue("result.size() " + result.size() + " > 0",
result.size() > 0)
for (int i = 0; i < result.size(); ++i) {
- if (!result[i].get("hot_table_name").equals(hotTableName)) {
+ if (!result[i].get("TableName").equals(hotTableName)) {
org.junit.Assert.assertTrue("cannot find expected cache hotspot
${hotTableName}", result.size() > i + 1)
continue
}
- assertEquals(result[i].get("compute_group_id"),
"regression_cluster_id0")
- assertEquals(result[i].get("compute_group_name"),
"regression_cluster_name0")
- assertEquals(result[i].get("hot_table_name"),
"regression_test_cloud_p0_cache_multi_cluster_warm_up_hotspot.customer")
+ assertEquals(result[i].get("ComputeGroupId"), "regression_cluster_id0")
+ assertEquals(result[i].get("ComputeGroupName"),
"regression_cluster_name0")
+ assertEquals(result[i].get("TableName"),
"regression_test_cloud_p0_cache_multi_cluster_warm_up_hotspot.customer")
break
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]