Skip to content

Commit 22dc6c9

Browse files
qzseegarenshi
andauthored
[Improvement][Audit] add sql type for query audit (#37790)
Co-authored-by: garenshi <garenshi@tencent.com>
1 parent 4bfbab5 commit 22dc6c9

156 files changed

Lines changed: 922 additions & 18 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

fe/fe-core/src/main/java/org/apache/doris/analysis/AlterCatalogCommentStmt.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,9 @@ public void analyze(Analyzer analyzer) throws UserException {
4646
public String toSql() {
4747
return "ALTER CATALOG " + catalogName + " MODIFY COMMENT " + comment;
4848
}
49+
50+
@Override
51+
public StmtType stmtType() {
52+
return StmtType.ALTER;
53+
}
4954
}

fe/fe-core/src/main/java/org/apache/doris/analysis/AlterCatalogNameStmt.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,9 @@ public void analyze(Analyzer analyzer) throws UserException {
5656
public String toSql() {
5757
return "ALTER CATALOG " + catalogName + " RENAME " + newCatalogName;
5858
}
59+
60+
@Override
61+
public StmtType stmtType() {
62+
return StmtType.ALTER;
63+
}
5964
}

fe/fe-core/src/main/java/org/apache/doris/analysis/AlterCatalogPropertyStmt.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,9 @@ public String toSql() {
5454
public boolean needAuditEncryption() {
5555
return true;
5656
}
57+
58+
@Override
59+
public StmtType stmtType() {
60+
return StmtType.ALTER;
61+
}
5762
}

fe/fe-core/src/main/java/org/apache/doris/analysis/AlterColocateGroupStmt.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,9 @@ public String toSql() {
7979
sb.append("PROPERTIES(").append(new PrintableMap<>(properties, " = ", true, false)).append(")");
8080
return sb.toString();
8181
}
82+
83+
@Override
84+
public StmtType stmtType() {
85+
return StmtType.ALTER;
86+
}
8287
}

fe/fe-core/src/main/java/org/apache/doris/analysis/AlterColumnStatsStmt.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,4 +219,9 @@ public String toSql() {
219219
public String getValue(StatsType statsType) {
220220
return statsTypeToValue.get(statsType);
221221
}
222+
223+
@Override
224+
public StmtType stmtType() {
225+
return StmtType.ALTER;
226+
}
222227
}

fe/fe-core/src/main/java/org/apache/doris/analysis/AlterDatabasePropertyStmt.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,9 @@ public String toSql() {
7676
return "ALTER DATABASE " + dbName + " SET PROPERTIES ("
7777
+ new PrintableMap<String, String>(properties, "=", true, false, ",") + ")";
7878
}
79+
80+
@Override
81+
public StmtType stmtType() {
82+
return StmtType.ALTER;
83+
}
7984
}

fe/fe-core/src/main/java/org/apache/doris/analysis/AlterDatabaseQuotaStmt.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,4 +94,9 @@ public String toSql() {
9494
+ quotaType.name()
9595
+ " QUOTA " + quotaValue;
9696
}
97+
98+
@Override
99+
public StmtType stmtType() {
100+
return StmtType.ALTER;
101+
}
97102
}

fe/fe-core/src/main/java/org/apache/doris/analysis/AlterDatabaseRename.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,9 @@ public String toSql() {
7373
return "ALTER DATABASE " + dbName + " RENAME " + newDbName;
7474
}
7575

76+
@Override
77+
public StmtType stmtType() {
78+
return StmtType.ALTER;
79+
}
80+
7681
}

fe/fe-core/src/main/java/org/apache/doris/analysis/AlterJobStatusStmt.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,9 @@ public void analyze(Analyzer analyzer) throws UserException {
7474
throw new AnalysisException("Can't alter inner job status");
7575
}
7676
}
77+
78+
@Override
79+
public StmtType stmtType() {
80+
return StmtType.ALTER;
81+
}
7782
}

fe/fe-core/src/main/java/org/apache/doris/analysis/AlterPolicyStmt.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,9 @@ public String toSql() {
9696
return sb.toString();
9797
}
9898

99+
@Override
100+
public StmtType stmtType() {
101+
return StmtType.ALTER;
102+
}
103+
99104
}

0 commit comments

Comments
 (0)