linhongliu-db opened a new pull request #33488:
URL: https://github.com/apache/spark/pull/33488


   ### What changes were proposed in this pull request?
   Previously we blocked creating tables with the void column to follow the 
hive behavior in PR #28833
   In this PR, I propose the restore the previous behavior to support the void 
column in a table.
   
   ### Why are the changes needed?
   According to this 
[discussion](https://github.com/apache/spark/pull/28833#discussion_r613003850) 
in PR #28833,
   
   > One typical use case where you use CTEs to structure your code is if you 
have multiple sources with different structures that you then UNION ALL 
together into a single dataset. It is not uncommon for each of the sources to 
have certain columns that don't apply, and then you write explicit NULLs there. 
It would be pretty annoying if you had to write explicit casts of those NULLs 
to the right type in all of those cases.
   
   
   ### Does this PR introduce _any_ user-facing change?
   Yes, this reverts the previous behavior change in #28833, for example, below 
command will success after this PR
   ```sql
   CREATE TABLE t (col_1 void, col_2 int)
   ```
   
   
   ### How was this patch tested?
   newly added and existing test cases


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