HyukjinKwon commented on a change in pull request #30752:
URL: https://github.com/apache/spark/pull/30752#discussion_r542057874
##########
File path:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/catalog/ExternalCatalogSuite.scala
##########
@@ -991,6 +991,13 @@ abstract class CatalogTestUtils {
def newUriForDatabase(): URI = new
URI(Utils.createTempDir().toURI.toString.stripSuffix("/"))
+ def newUriForPartition(parts: Seq[String]): URI = {
+ val path = parts.foldLeft(Utils.createTempDir()) {
+ case (parent, part) => new java.io.File(parent, part)
+ }
+ new URI(path.toURI.toString.stripSuffix("/"))
+ }
Review comment:
no biggie but I would do:
```suggestion
def newUriForPartition(parts: Seq[String]): URI = {
val path = parts.foldLeft(Utils.createTempDir())(new java.io.File(_, _))
new URI(path.toURI.toString.stripSuffix("/"))
}
```
----------------------------------------------------------------
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]