mirror of
https://github.com/apache/doris.git
synced 2026-11-04 07:31:17 +00:00
### What problem does this PR solve? When an unsupported upstream DDL pauses a streaming job, the existing `ErrorMsg` contains the unsupported-change reason, source table, and observed added/removed columns, but **does not contain the original upstream SQL or identify the mapped Doris target table**. For MySQL, the original DDL is available in the CDC logs only. Users therefore need to find that statement and resolve the target mapping before deciding how to adjust the Doris schema. This PR puts that diagnostic context directly in `ErrorMsg` and makes the recovery guidance consistent between the initial failure and a failed RESUME. | Information | Before | After | | --- | --- | --- | | Original MySQL DDL | Written to CDC logs; absent from `ErrorMsg` | Complete statement appended as `Source DDL: [...]`, including all clauses of a mixed DDL | | Table identification | Source table only | `source_table -> doris_db.actual_mapped_table` | | Same-name MODIFY/CHANGE | `(amount -> amount)` | `(amount)`; real renames retain both names | | PostgreSQL change details | Observed types/OIDs and column differences | Those details are retained, with the mapped target table added; no original SQL is available from the change event | | RESUME guidance | Confirmation explained on the initial failure, but omitted from the resumed failure hint | Both failure paths explain schema review and RESUME confirmation | | Target validation failure | Concrete error such as `missing columns [city]` | Retained alongside the diagnostic context and common recovery hint |