HyukjinKwon commented on a change in pull request #32074: URL: https://github.com/apache/spark/pull/32074#discussion_r611324298
########## File path: sql/core/src/main/scala/org/apache/spark/sql/execution/command/resources.scala ########## @@ -67,17 +65,16 @@ case class ListFilesCommand(files: Seq[String] = Seq.empty[String]) extends Runn } override def run(sparkSession: SparkSession): Seq[Row] = { val fileList = sparkSession.sparkContext.listFiles() - if (files.size > 0) { - files.map { f => - val uri = new URI(f) - val schemeCorrectedPath = uri.getScheme match { - case null | "local" => new File(f).getCanonicalFile.toURI.toString - case _ => f - } - new Path(schemeCorrectedPath).toUri.toString Review comment: @sarutak, I think `listFiles` is always URIs if I am not mistaken. If they are all canonical URIs, I believe we don't have to switch `Path` (?). -- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org