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

   ### What changes were proposed in this pull request?
   
   This PR updates column DEFAULT assignment to add missing values for MERGE 
INSERT actions. This brings the behavior to parity with non-MERGE INSERT 
commands.
   
   It also adds a small convenience feature where if the provided default value 
is a literal of a wider type than the target column, but the literal value fits 
within the narrower type, just coerce it for convenience. For example, `CREATE 
TABLE t (col INT DEFAULT 42L)` returns an error before this PR because `42L` 
has a long integer type which is wider than `col`, but after this PR we just 
coerce it to `42` since the value fits within the short integer range.
   
   ### Why are the changes needed?
   
   These changes make column DEFAULT values more usable in more types of 
situations.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes, see above.
   
   ### How was this patch tested?
   
   This PR adds new unit test coverage.


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