You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit fe39f5b
Browse filesBrowse the repository at this point in the historyBrowse files
[fix](ivm) Answer FE-computable dry runs on the frontend instead of a placeholder backend (#67753)
`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.
Trace issue: #65418
0 commit comments