databricks-david-lewis commented on code in PR #40947:
URL: https://github.com/apache/spark/pull/40947#discussion_r1185662054


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/FileFormat.scala:
##########
@@ -265,8 +265,13 @@ object FileFormat {
    * fields of the [[PartitionedFile]], and do have entries in the file's 
metadata map.
    */
   val BASE_METADATA_EXTRACTORS: Map[String, PartitionedFile => Any] = Map(
-    FILE_PATH -> { pf: PartitionedFile => pf.toPath.toString },
-    FILE_NAME -> { pf: PartitionedFile => pf.toPath.getName },
+    FILE_PATH -> { pf: PartitionedFile =>
+      // Use new Path(Path.toString).toString as a form of canonicalization
+      new Path(pf.filePath.toPath.toString).toString

Review Comment:
   Whoops, this is what I get for doing all my development in the middle of the 
night 🤦 
   Sorry, I will put up a new PR soon.



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

Reply via email to