gatorsmile commented on a change in pull request #24725: [SPARK-27863][SQL]
Metadata files and temporary files should not be counted as data files
URL: https://github.com/apache/spark/pull/24725#discussion_r291469094
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/command/CommandUtils.scala
##########
@@ -343,4 +340,8 @@ object CommandUtils extends Logging {
cs.copy(histogram = Some(histogram))
}
}
+
+ private def isDataPath(path: Path, stagingDir: String): Boolean = {
+ !path.getName.startsWith(stagingDir) && DataSourceUtils.isDataPath(path)
Review comment:
I think we might need a change in the impl of
DataSourceUtils.isDataPath(path). See what we did in InMemoryFileIndex:
https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/InMemoryFileIndex.scala#L363-L369
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]