Skip to content

Commit

Permalink
[minor](stats) ADD LOG in analyze task (#21362)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikyou1997 authored Jul 7, 2023
1 parent 2d445bb commit cad9e88
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ public void execSQL(String sql) throws Exception {
if (killed) {
return;
}
long startTime = System.currentTimeMillis();
try (AutoCloseConnectContext r = StatisticsUtil.buildConnectContext()) {
r.connectContext.getSessionVariable().disableNereidsPlannerOnce();
stmtExecutor = new StmtExecutor(r.connectContext, sql);
Expand All @@ -122,6 +123,7 @@ public void execSQL(String sql) throws Exception {
throw new RuntimeException(String.format("Failed to analyze %s.%s.%s, error: %s sql: %s",
info.catalogName, info.dbName, info.colName, sql, queryState.getErrorMessage()));
}
LOG.info("Analyze SQL: " + sql + " cost time: " + (System.currentTimeMillis() - startTime) + "ms");
}
}
}

0 comments on commit cad9e88

Please sign in to comment.