dilipbiswal commented on a change in pull request #24333: [SQL][MINOR][TEST] In 
SQLQueryTestSuite ignore .swp and .swo files from processinge
URL: https://github.com/apache/spark/pull/24333#discussion_r274258072
 
 

 ##########
 File path: sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala
 ##########
 @@ -329,7 +329,8 @@ class SQLQueryTestSuite extends QueryTest with 
SharedSQLContext {
   /** Returns all the files (not directories) in a directory, recursively. */
   private def listFilesRecursively(path: File): Seq[File] = {
     val (dirs, files) = path.listFiles().partition(_.isDirectory)
-    files ++ dirs.flatMap(listFilesRecursively)
+    val filteredFiles = files.filter (_.getName matches 
validTestFileExtensionsRegEx)
 
 Review comment:
   @srowen Thanks.. Sure... I will make the change. I wanted to confirm one 
thing.. so initially i had it as a regex as i thought, it may be easier for us 
to add extensions other than `.sql` in the future. But if we are going to stay 
with `.sql`, should we just do a `endsWith` check instead ? WDYT ?

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to