HyukjinKwon commented on a change in pull request #30707:
URL: https://github.com/apache/spark/pull/30707#discussion_r540661889



##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcFileFormat.scala
##########
@@ -170,7 +170,15 @@ class OrcFileFormat
     (file: PartitionedFile) => {
       val conf = broadcastedConf.value.value
 
-      val filePath = new Path(new URI(file.filePath))
+      var path: Option[Path] = None
+      import scala.util.Try

Review comment:
       I would prefer to avoid relying on try-catch whenever possible.
   
   Also, a space in a URI doesn't look correct. HDFS itself has a complicated 
behaviour arond path and URIs so let;s don't follow the behaviour unless it's 
known as a legitimate behaviour (is it?).`file.filePath` should be a URI so the 
behaviour `new Path(new URI(file.filePath))` seems correct.
   




----------------------------------------------------------------
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]

Reply via email to