Github user windpiger commented on the issue:
https://github.com/apache/spark/pull/16545
sorry, it is not the point. the example make some confuse.
replaced it with another example.
val df = spark.read.json("/path/a")
val df1 = spark.read.json("/path/b")
df.createOrReplaceTempView("x")
df1.createOrReplaceTempView("y")
spark.sql("insert overwrite table x select * from y")
this sql executed will hit the function `deleteMatchingPartitions` here
https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/InsertIntoHadoopFsRelationCommand.scala#L104
the point is `/path/a` is `not a partition path`(e.g. /path/a=1),we still
delete it through `deleteMatchingPartitions`.
From the method name `MatchingPartitions` ,we may think it is only apply to
a `partition file`(e.g. /path/a=1). If it also apply to `no partition file`, we
will confused.
if we change the name from `deleteMatchingPartitions` to
`deleteMatchingPrefix` , is't more clear?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]