panbingkun commented on code in PR #43505:
URL: https://github.com/apache/spark/pull/43505#discussion_r1377179469
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/FileStreamSink.scala:
##########
@@ -51,7 +51,7 @@ object FileStreamSink extends Logging {
val hdfsPath = new Path(singlePath)
try {
val fs = hdfsPath.getFileSystem(hadoopConf)
- if (fs.isDirectory(hdfsPath)) {
+ if (fs.getFileStatus(hdfsPath).isDirectory) {
Review Comment:
In the original semantics, if `hdfsPath` does not exist, it will directly
return `false`. In the new semantics, if `hdfsPath` does not exist, it will
`throw FileNotFoundException`, execute the logic to `catch case NonFatal(e)`,
and ultimately return `false`.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]