viirya commented on a change in pull request #29552:
URL: https://github.com/apache/spark/pull/29552#discussion_r477537434
##########
File path: core/src/main/scala/org/apache/spark/util/Utils.scala
##########
@@ -269,6 +269,27 @@ private[spark] object Utils extends Logging {
file.setExecutable(true, true)
}
+ /**
+ * Move data to trash if 'spark.sql.truncate.trash.enabled' is true
+ */
+ def moveToTrashIfEnabled(
+ fs: FileSystem,
+ partitionPath: Path,
+ isTrashEnabled: Boolean,
+ hadoopConf: Configuration): Boolean = {
Review comment:
This method name and doc is actually not accurate. It will delete the
path, not just move the data to trash. Actually it is short and can easily get
it by looking into the code. But it is nicer if we give it correct method name
and correct doc.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]