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/19 00:15:10 UTC

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

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

   ### 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] cloud-fan closed pull request #36252: [SPARK-38939][SQL] Support DROP COLUMN [IF EXISTS] syntax

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


-- 
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] cloud-fan commented on pull request #36252: [SPARK-38939][SQL] Support DROP COLUMN [IF EXISTS] syntax

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on PR #36252:
URL: https://github.com/apache/spark/pull/36252#issuecomment-1108829766

   thanks, merging to master!


-- 
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] AmplabJenkins commented on pull request #36252: [SPARK-38939][SQL] Support DROP COLUMN [IF EXISTS] syntax

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on PR #36252:
URL: https://github.com/apache/spark/pull/36252#issuecomment-1103504970

   Can one of the admins verify this patch?


-- 
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] cloud-fan commented on pull request #36252: [SPARK-38939][SQL] Support DROP COLUMN [IF EXISTS] syntax

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on PR #36252:
URL: https://github.com/apache/spark/pull/36252#issuecomment-1108921069

   also backported to 3.3 as it changes DS v2 API (`DropColumn`), so that it's possible to stabilize DS v2 API in 3.4. We can revert it if there are objections.


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