-
Notifications
You must be signed in to change notification settings - Fork 29.1k
[SPARK-32481][CORE][SQL] Support truncate table to move data to trash #29387
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
Changes from 1 commit
58d957a
81101d9
502dd08
97d2146
a52e9a5
8848b3f
a2df53b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2722,12 +2722,14 @@ object SQLConf { | |
| .booleanConf | ||
| .createWithDefault(false) | ||
|
|
||
| val TRUNCATE_TRASH_INTERVAL = | ||
| buildConf("spark.sql.truncate.trash.interval") | ||
| .doc("This Configuration will decide whether move files to trash on truncate table" + | ||
| "If -1 files will be deleted without moving to trash") | ||
| .intConf | ||
| .createWithDefault(-1) | ||
| val TRUNCATE_TRASH_ENABLED = | ||
| buildConf("spark.sql.truncate.trash.enabled") | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. quick question, do we want to have each configuration for each operation? Looks like #29319 targets similar stuff. Maybe it'd make more sense to have a global configuration.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will rework on #29319 and make it a global configuration.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep. It's too early to make it a global configuration. |
||
| .doc("This Configuration will decide whether move files to trash on truncate table given, " + | ||
Udbhav30 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "'fs.trash.interval' is positive in Hadoop Configuration. " + | ||
| "Note that, in Hadoop conf if server side has this configured then the client side " + | ||
| "one will be ignored. ") | ||
| .booleanConf | ||
Udbhav30 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| .createWithDefault(false) | ||
|
|
||
| /** | ||
| * Holds information about keys that have been deprecated. | ||
|
|
@@ -3341,7 +3343,7 @@ class SQLConf extends Serializable with Logging { | |
|
|
||
| def legacyPathOptionBehavior: Boolean = getConf(SQLConf.LEGACY_PATH_OPTION_BEHAVIOR) | ||
|
|
||
| def truncateTrashInterval: Int = getConf(SQLConf.TRUNCATE_TRASH_INTERVAL) | ||
| def truncateTrashEnabled: Boolean = getConf(SQLConf.TRUNCATE_TRASH_ENABLED) | ||
|
|
||
| /** ********************** SQLConf functionality methods ************ */ | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.