Skip to content

[SPARK-52306][SQL] Add support of ALTER TABLE ... UNSET SERDEPROPERTIES #51017

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wecharyu
Copy link
Contributor

What changes were proposed in this pull request?

Introduce a new SQL to enable unset SERDE properties:

ALTER TABLE table_identifier partition_spec UNSET SERDEPROPERTIES [ IF EXISTS ] ( key1, key2, ... )

Why are the changes needed?

Spark SQL already supports SET SERDEPROPERTIES, it would be more convenient if we can use UNSET SERDEPROPETIES

Does this PR introduce any user-facing change?

Yes, user can use this new SQL.

How was this patch tested?

Add unit tests:

./build/mvn  test -Dtest=none -Dsuites="org.apache.spark.sql.execution.command.AlterTableUnsetSerdePropertiesParserSuite" -pl :spark-sql_2.13
./build/mvn  test -Dtest=none -Dsuites="org.apache.spark.sql.execution.command.v1.AlterTableUnsetSerdePropertiesSuite" -pl :spark-sql_2.13
./build/mvn  test -Dtest=none -Dsuites="org.apache.spark.sql.hive.execution.command.AlterTableUnsetSerdePropertiesSuite" -pl :spark-hive_2.13
./build/mvn  test -Dtest=none -Dsuites="org.apache.spark.sql.execution.command.v2.AlterTableUnsetSerdePropertiesSuite" -pl :spark-sql_2.13

Was this patch authored or co-authored using generative AI tooling?

No.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant