dtenedor opened a new pull request, #36415:
URL: https://github.com/apache/spark/pull/36415
## What changes were proposed in this pull request?
DEFAULT columns are now supported in UPDATE commands.
Example:
```
CREATE TABLE t(
i STRING,
c CHAR(5),
d VARCHAR(5),
e STRING DEFAULT 'abc',
f BIGINT DEFAULT 42)
USING DELTA;
INSERT INTO t VALUES('1', '12345', '67890', 'def', 31);
UPDATE t SET c = DEFAULT WHERE i = '1';
SELECT * FROM t;
> "1", NULL, "67890", "def", 31
UPDATE t SET e = DEFAULT WHERE i = '1';
SELECT * FROM t;
> "1", NULL, "67890", "abc", 31
UPDATE t SET e = 'ghi' WHERE i = '1';
SELECT * FROM t;
> "1", NULL, "67890", "ghi", 31
```
### Why are the changes needed?
This makes UPDATE commands easier to use.
### Does this PR introduce _any_ user-facing change?
Yes.
## 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]