-
Notifications
You must be signed in to change notification settings - Fork 28k
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
[SPARK-19166][SQL]rename from InsertIntoHadoopFsRelationCommand.deleteMatchingPartitions to deleteMatchingPrefix #16545
Conversation
…ommand.deleteMatchingPartitions to InsertIntoHadoopFsRelationCommand.deleteMatchingPrefix
Test build #71190 has started for PR 16545 at commit |
I don't think this kind of thing is worth changing; the docs look correct. When would you have other files as the peer of a partition directory? |
thanks! even though it is a no-partition file, it will also be deleted, so I think this change will more clear |
Why would a file exist there? if it doesn't exist in any normal operation then I don't see a good motive for changing this, as it works as designed already. |
thanks! val df = spark.read.json("/path/jsonfile") df.createOrReplaceTempView("t") spark.sql("insert overwrite table t select * from t1") this sql executed will hit the function while |
Are you saying the problem arises when the path to one dataset/table is a prefix of another? |
sorry, it is not the point. the example make some confuse. val df = spark.read.json("/path/a") df.createOrReplaceTempView("x") spark.sql("insert overwrite table x select * from y") this sql executed will hit the function the point is From the method name if we change the name from |
So you're saying it works fine, you just take issue with the internal method/doc name? OK, but in the non-partitioned case, deleting everything is also a matter of deleting But the example in the comment you added seems to refer to a different case, about a file matching the same prefix being deleted? |
2.a file matching the same prefix being deleted, this doesn't happen, it is ok. maybe |
Test build #71413 has finished for PR 16545 at commit
|
Test build #71896 has finished for PR 16545 at commit
|
What changes were proposed in this pull request?
InsertIntoHadoopFsRelationCommand.deleteMatchingPartitions delete all files that match a static prefix, such as a partition file path(/table/foo=1), or a no partition file path(/xxx/a.json).
while the method name deleteMatchingPartitions indicates that only the partition file will be deleted. This name make a confused.
It is better to rename the method name.
How was this patch tested?