naveenp2708 commented on PR #57644:
URL: https://github.com/apache/spark/pull/57644#issuecomment-6869383297

   Thank you @szehon-ho , good catches. Fixed both.
   
   On the map: reconcile, validate, and the casing-drift check walked structs 
and array elements but not maps. The SCD1 __VERSION_MAP is MAP<STRING, 
sequencingType>, so for a struct SEQUENCE BY the reserved nested fields sit 
inside the map value, and that path was getting dropped to the engine’s 
spelling, wasn’t validated, and a case-only drift in there was missed. 
reconcileReservedType, validateReservedType, and typeCasingDrifts now recurse 
the map key and value the same way as the struct and array cases, which lines 
up with how diffSchemas keys the value path.
   
   On the omitted nested field: a partial declaration was appending the missing 
engine field with the engine’s nullability, but omitting the whole column 
appends it asNullable. That mismatch meant dropping a partial declaration on a 
later run could try to relax a NOT NULL under a nested array, which diffSchemas 
rejects as an unsupported nested-complex-type evolution. 
reconcileReservedStruct now appends an omitted nested field asNullable too, so 
the two paths match and the later run evolves cleanly.
   
   Added tests for map-value spelling preservation, map-value casing drift, 
map-value validation (unknown nested field rejected), and the 
partial-then-dropped nullability path. Full pipelines + reserved-column suites 
pass, scalastyle clean.


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