zhang-arvin commented on PR #67629: URL: https://github.com/apache/doris/pull/67629#issuecomment-6059320464
Thanks @morrySnow — added a description. On the alternative: I agree the root cause is in the replay path. Metadata replay reconstructs a view-over-external-catalog column with a `defineName` (the qualified source ref) that diverges from its `name`, and `nameToColumn` is keyed by `defineName`, so the map lookup misses it — while every other resolution path (DESCRIBE, query planning, `LogicalCheckPolicy`) goes through the full schema. Making replay produce the same columns as a freshly created view would indeed remove the need for this guard change. I kept the change at the `validate()` guard for now because: 1. it makes the CREATE-time guard consistent with the paths that actually resolve the column, so the guard can't reject something the planner accepts; and 2. it's a small, low-blast-radius change — `getFullSchema()` is a superset of `nameToColumn`, so it cannot reject a column `getColumn` would have accepted. Changing what replay writes into `defineName` / `nameToColumn` touches every name-based lookup on every reloaded view/table, which is a much wider surface for a replay-only corruption, so I'd rather keep that separate. Do you want me to pursue the replay-side fix as well — as a follow-up PR linked to #67625, or folded into this one? -- 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]
