You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/04/11 05:00:23 UTC

[GitHub] [spark] dilipbiswal commented on a change in pull request #24333: [SQL][MINOR][TEST] In SQLQueryTestSuite ignore .swp and .swo files from processinge

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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org