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



##########
File path: sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala
##########
@@ -566,7 +563,14 @@ class SQLQueryTestSuite extends QueryTest with 
SharedSparkSession with SQLHelper
     // Filter out test files with invalid extensions such as temp files created
     // by vi (.swp), Mac (.DS_Store) etc.
     val filteredFiles = files.filter(_.getName.endsWith(validFileExtensions))
-    filteredFiles ++ dirs.flatMap(listFilesRecursively)
+    val allFiles = filteredFiles ++ dirs.flatMap(listFilesRecursively)
+    // SPARK-32106 Since we add SQL test 'transform.sql' will use `cat` 
command,
+    // here we need to check command available
+    if (TestUtils.testCommandAvailable("/bin/bash")) {
+      allFiles
+    } else {
+      allFiles.filterNot(_.getName == "transform.sql")

Review comment:
       The case I tested above is when the file is `transform.sql` and  
`TestUtils.testCommandAvailable("/bin/bash")` returns `false`. I tested it by 
manually changing `/bin/bash` to an arbitrary executable such as `/bin/bas`.
   
   Does it fail and stop all other test cases? Then maybe it is a Windows 
specific behaviour. If that's the case, I am fine with the current fix.




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