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

   ### What changes were proposed in this pull request?
   
   This PR extends column default support to allow the ORDER BY, LIMIT, and 
OFFSET clauses at the end of a SELECT query in the INSERT source relation.
   
   For example:
   
   ```
   create table t1(i boolean, s bigint default 42) using parquet;
   insert into t1 values (true, 41), (false, default);
   create table t2(i boolean default true, s bigint default 42, 
                   t string default 'abc') using parquet;
   insert into t2 (i, s) select default, s from t1 order by s limit 1;
   select * from t2;
   > true, 41L, "abc"
   ```
   
   ### Why are the changes needed?
   
   This improves usability and helps prevent confusing error messages.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes, SQL queries that previously failed will now succeed.
   
   ### 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