suhuruli commented on PR #60463:
URL: https://github.com/apache/spark/pull/60463#issuecomment-6925537948

   Thanks for the thorough review. The blocking finding is fixed by letting 
each `evolveTable` caller choose the merge: streaming tables take shared-column 
metadata from the declared or inferred schema, the AutoCDC auxiliary table 
keeps the plain additive merge, and `AutoCdcAuxiliaryTableMaterializationSuite` 
pins both the nested and the top-level comment drift cases. The two nits are 
addressed in `DatasetManager` and `SchemaMergingUtilsSuite` as described inline.
   
   On the two open questions: I kept the failure for a comment change on a 
struct field under consecutive arrays or maps, but it now raises 
`PIPELINE_NESTED_COMPLEX_TYPE_COMMENT_CHANGE_UNSUPPORTED`, which names the 
field (for example `arr.element.element.a`) and says how to proceed, instead of 
showing two identical types. 
`SchemaInferenceUtils.rejectUnsupportedNestedTypeChanges` raises it when every 
change it would reject is an `UpdateColumnComment`, and 
`SchemaInferenceUtilsSuite` and `MaterializeTablesSuite` cover it, the latter 
with a streaming table whose `array<array<struct>>` inner comment changes. For 
the rollout, I added a migration note to the 4.3 to 4.4 section of 
`docs/sql-migration-guide.md` rather than a new SQL configuration: it says that 
incremental updates of streaming tables now apply comment changes from the 
pipeline's declared or inferred schema, remove comments that schema lacks 
(including ones set directly on the table), fail with the new error for a 
change under
  consecutive arrays or maps, and that declaring a comment keeps it. One 
wording detail: a plain full refresh truncates the table and then diffs the 
desired schema against the same nested check, so the error's remedy is to 
declare the table's current comment, or to drop the table and full refresh it 
so that it is re-created. The PR description now states the comment removal, 
the new error and the migration note in the user-facing change section.


-- 
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]

Reply via email to