-
Notifications
You must be signed in to change notification settings - Fork 3k
[Docs] Update drop table behavior in spark-ddl docs #5645
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
Conversation
| Prior to 0.14, running `DROP TABLE` would remove the table from the catalog and delete the table contents as well. | ||
|
|
||
| From 0.14 onwards, `DROP TABLE` would only remove the table from the catalog. | ||
| In order to delete the table contents `DROP TABLE PURGE` should be used. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it worth mentioning that gc.enabled has to be true for the contents to be deleted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it is implied that if an operation involves removing any table files then gc.enabled should be true.
With that said, I didn't find an occurrence of gc.enabled anywhere in the iceberg spark docs. Thus decided to follow the same pattern.
samredai
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I just left a small suggestion. 👍
docs/spark-ddl.md
Outdated
|
|
||
| ### `DROP TABLE PURGE` | ||
|
|
||
| To delete a table, run: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To make the distinction a bit clearer with DROP TABLE, how about rewording this to:
To drop the table from the catalog and delete the table's contents, run:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @samredai, thank you for your comment, took care of it in the latest commit.
310d4e0 to
2c04fbe
Compare
|
Thanks for the fix @sumeetgajjar and @wypoon and @samredai for the review! |
#3056 added support for
PURGEflag to Spark.However, the corresponding
DROP TABLEdoc is outdated.This PR aims at documenting the updated behavior of the
DROP TABLEDDL command.Closes #5646