Skip to content

Commit

Permalink
add query type column
Browse files Browse the repository at this point in the history
  • Loading branch information
wangbo committed Feb 21, 2024
1 parent 89ce566 commit f13fdc9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,10 @@ public String getSql() {
public long getStartExecTime() {
return startExecTime;
}

public QueryType getQueryType() {
return queryType;
}
}

private class WriteProfileTask implements Runnable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public class ActiveQueriesTableValuedFunction extends MetadataTableValuedFunctio
new Column("ShuffleSendRows", PrimitiveType.BIGINT),
new Column("Database", ScalarType.createStringType()),
new Column("FrontendInstance", ScalarType.createStringType()),
new Column("QueryType", ScalarType.createStringType()),
new Column("Sql", ScalarType.createStringType()));

private static final ImmutableMap<String, Integer> COLUMN_TO_INDEX;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,7 @@ private static TRow makeQueryStatisticsTRow(SimpleDateFormat sdf, String queryId
trow.addToColumnValue(new TCell().setStringVal(""));
}
trow.addToColumnValue(new TCell().setStringVal(selfNode));
trow.addToColumnValue(new TCell().setStringVal(queryInfo.getQueryType()));
trow.addToColumnValue(new TCell().setStringVal(queryInfo.getSql()));

return trow;
Expand Down

0 comments on commit f13fdc9

Please sign in to comment.