yujun777 opened a new pull request, #67753: URL: https://github.com/apache/doris/pull/67753
### What problem does this PR solve? `REFRESH MATERIALIZED VIEW ... INCREMENTAL WITH DRY RUN` fails with `Unable to resolve host dummy` in cloud mode when the delta is empty. An empty delta plans to a `LogicalEmptyRelation`, so the Nereids planner marks the plan as not needing a backend (`notNeedBackend`) and binds the placeholder `Backend(-1, "dummy", -1)`. Regular queries short-circuit such FE-computable plans inside `handleQueryInFe`; the internal streaming entry used by IVM dry runs (`RefreshMTMVCommand.dryRunRefresh` -> `StmtExecutor.executeInternalQueryAndSend`) skipped that short-circuit and started a coordinator, which then sent fragments to `dummy:-1`. ### What changed - `StmtExecutor.executeInternalQueryCommon` now short-circuits FE-computable plans through `planner.handleQueryInFe` for both the streaming (`sendChannel`) and the collecting internal entry, writing rows to the caller's mysql channel. - `sendResultSet`, `sendMetaData`, `sendTextResultRow` and `sendBinaryResultRow` take an explicit `MysqlChannel` overload; the previous signatures keep using the executor's own channel. - `isHandleQueryInFe` and `ExecutedByFrontend` are set only after the result set was sent, matching the regular query path. - `test_ivm_refresh_dry_run` no longer skips cloud. The new `ivm_dry_run_qt` helper masks `__DORIS_SEQUENCE_COL__` (whose base value differs between cloud and shared-nothing) through the `quickRunTest` row converter, which now optionally receives the result metadata, so both modes share one suite and one `.out`. Both suites cover the empty-delta dry run. ### Test - `regression-test/suites/mtmv_p0/ivm/test_ivm_refresh_dry_run.groovy` (local and cloud): failed before the fix on cloud with `Unable to resolve host dummy`, passes after. - `regression-test/suites/mtmv_p0/ivm/test_ivm_explain_refresh.groovy`: existing single-argument row converter still works. - selectdb-cases `ivm_refresh_dry_run_projection_dml`, `ivm_refresh_dry_run_aggregate_semantics` and `ivm_refresh_dry_run_boundary` on cloud: all pass. Trace issue: https://github.com/apache/doris/issues/65418 -- 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]
