github-actions[bot] commented on code in PR #70782:
URL: https://github.com/apache/doris/pull/70782#discussion_r4661531972
##########
fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java:
##########
@@ -2188,6 +2212,20 @@ public List<ResultRow> executeInternalQuery() {
LOG.warn("Failed to run internal SQL: {}", originStmt, e);
throw new RuntimeException("Failed to execute internal SQL. "
+ Util.getRootCauseMessage(e), e);
}
+ if (context.supportHandleByFe()) {
+ Optional<ResultSet> resultSet =
planner.handleQueryInFe(parsedStmt);
+ if (resultSet.isPresent()) {
+ List<List<String>> rows = resultSet.get().getResultRows();
Review Comment:
[P2] Preserve internal-query profiling on the FE shortcut. When
`Config.enable_collect_internal_query_profile` is true,
`executeInternalQuery()` still sets `context.getSessionVariable().enableProfile
= true` only after this new `planner.handleQueryInFe()` branch. FE-computable
internal queries, including the synthetic SHOW CHARSET filter and `SELECT 1`,
return before the switch is applied, so `updateProfile(true)` records no
configured internal profile. Apply the config before the FE shortcut while
retaining the `executedByFrontend` marker.
##########
fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java:
##########
@@ -2188,6 +2212,20 @@ public List<ResultRow> executeInternalQuery() {
LOG.warn("Failed to run internal SQL: {}", originStmt, e);
Review Comment:
[P1] Honor cancellation before returning an FE-computed internal result. The
nested executor receives outer cancellation through `internalExecutor::cancel`,
but `executeInternalQuery()` checks `pendingCoordinatorCancelReason` only in
the coordinator fallback. For `SHOW CHARSET WHERE TRUE`, `handleQueryInFe()`
can return a result through this branch after a timeout or KILL races with
planning, so the outer SHOW command can still send a successful row. Check the
pending reason after planning and before or after the FE shortcut and propagate
cancellation instead of returning rows.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]