Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dataroaring committed Sep 18, 2024
1 parent 14d1b09 commit 99d9827
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 0 additions & 2 deletions fe/fe-core/src/main/cup/sql_parser.cup
Original file line number Diff line number Diff line change
Expand Up @@ -8497,8 +8497,6 @@ keyword ::=
{: RESULT = id; :}
| KW_STOP:id
{: RESULT = id; :}
| KW_GROUP:id
{: RESULT = id; :}
| KW_GROUPING:id
{: RESULT = id; :}
| KW_GROUPS:id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
public class ShowCacheHotSpotStmt extends ShowStmt implements NotFallbackInParser {
public static final ShowResultSetMetaData[] RESULT_SET_META_DATAS = {
ShowResultSetMetaData.builder()
.addColumn(new Column("cluster_id", ScalarType.createType(PrimitiveType.BIGINT)))
.addColumn(new Column("cluster_name", ScalarType.createVarchar(128)))
.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)))
.build(),
Expand Down Expand Up @@ -129,7 +129,8 @@ private String generateQueryString() {
+ "sum(query_per_week) as query_per_week_total "
+ "FROM " + TABLE_NAME.toString()
+ " group by cluster_id, cluster_name, table_id, table_name, insert_day) ");
StringBuilder q2 = new StringBuilder("select cluster_id, cluster_name, "
StringBuilder q2 = new StringBuilder("select cluster_id as compute_group_id, "
+ "cluster_name as compute_group_name, "
+ "table_id, table_name as hot_table_name from (select row_number() "
+ "over (partition by cluster_id order by insert_day desc, "
+ "query_per_day_total desc, query_per_week_total desc) as dr2, "
Expand Down

0 comments on commit 99d9827

Please sign in to comment.