ksbeyer opened a new pull request, #51466:
URL: https://github.com/apache/spark/pull/51466

   ### What changes were proposed in this pull request?
   
   TableOutputResolver no longer propagates table attribute metdata to query 
attributes. InsertIntoHadoopFsRelationCommand propagates existenceDefaultValue 
from table attributes to query attributes only for JSON output. This fixes 
cases with complex types not getting explicit nulls in JSON when it should.
   
   ### Why are the changes needed?
   
   Minor bug fix and to simplify TableOutputResolver.
   
   ### Does this PR introduce _any_ user-facing change?
   
   When JSON_GENERATOR_WRITE_NULL_IF_WITH_DEFAULT_VALUE is true (which is 
default), complex type fields with a default written using JSON will now get 
the requested explicit NULL instead of the field omitted.
   
   ### How was this patch tested?
   
   Test case added to InsertSuite for complex types that failed before changes 
and passes after.  Also added some test cases to V2WriteAnalysisSuiteBase to 
validate changes to query attribute metadata did not break things.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   No


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