srowen 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_r274227167
##########
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:
Let's avoid postfix syntax.
Not that it matters, but it is probably a little more efficient to make the
regex a regex above with `.r` and then match with that pattern here.
----------------------------------------------------------------
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]