LuciferYang commented on code in PR #38422:
URL: https://github.com/apache/spark/pull/38422#discussion_r1016114950
##########
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/DataSourceSuite.scala:
##########
@@ -109,18 +109,22 @@ class DataSourceSuite extends SharedSparkSession with
PrivateMethodTester {
}
test("test non existent paths") {
- assertThrows[AnalysisException](
- DataSource.checkAndGlobPathIfNecessary(
- Seq(
- path1.toString,
- path2.toString,
- nonExistentPath.toString
- ),
- hadoopConf,
- checkEmptyGlobPath = true,
- checkFilesExist = true,
- enableGlobbing = true
- )
+ checkError(
+ exception = intercept[AnalysisException](
+ DataSource.checkAndGlobPathIfNecessary(
+ Seq(
+ path1.toString,
+ path2.toString,
+ nonExistentPath.toString
+ ),
+ hadoopConf,
+ checkEmptyGlobPath = true,
+ checkFilesExist = true,
+ enableGlobbing = true
+ )
+ ),
+ errorClass = "PATH_NOT_FOUND",
+ parameters = Map("path" -> "mockFs://mockFs/nonexistentpath")
Review Comment:
https://github.com/apache/spark/blob/f692771444d72bbac80abf6ac6066059b0ac4579/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSource.scala#L770-L781
@itholic It seems that the check is parallel, and the results may be
different for different Scala version. If we don't care about this, can we
consider making the case only have `nonExistentPath `?
--
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]