You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/04/18 23:07:24 UTC

[GitHub] [spark] jackierwzhang opened a new pull request, #36249: [SPARK-38939][SQL] Support DROP [IF EXISTS] COLUMN syntax

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

   ### What changes were proposed in this pull request?
   This PR introduces the following:
   - Parser changes to have an `IF EXISTS` syntax for `DROP COLUMN`.
   - Logic to silence the errors within parser and analyzer when encountering missing columns while using `IF EXISTS`
   - Ensure only resolving and dropping existing columns inside table schema
   
   ### Why are the changes needed?
   Currently `ALTER TABLE ... DROP COLUMN(s) ...` syntax will always throw error if the column doesn't exist. This PR would like to provide an (IF EXISTS) syntax to provide better user experience for downstream handlers (such as Delta with incoming column dropping support) that support it, and make consistent with some other DMLs such as `DROP TABLE (IF EXISTS)`.
   
   ### Does this PR introduce _any_ user-facing change?
   User may now specify `ALTER TABLE xxx DROP IF EXISTS COLUMN(S) a, a.b, c.d`.
   
   ### How was this patch tested?
   Modified existing unit tests and new unit tests.
   


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] jackierwzhang closed pull request #36249: [SPARK-38939][SQL] Support DROP [IF EXISTS] COLUMN syntax

Posted by GitBox <gi...@apache.org>.
jackierwzhang closed pull request #36249: [SPARK-38939][SQL] Support DROP [IF EXISTS] COLUMN syntax
URL: https://github.com/apache/spark/pull/36249


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org