Github user mgaido91 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21568#discussion_r196023232
  
    --- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala ---
    @@ -250,11 +278,33 @@ class SQLQueryTestSuite extends QueryTest with 
SharedSQLContext {
       }
     
       private def listTestCases(): Seq[TestCase] = {
    -    listFilesRecursively(new File(inputFilePath)).map { file =>
    -      val resultFile = file.getAbsolutePath.replace(inputFilePath, 
goldenFilePath) + ".out"
    -      val absPath = file.getAbsolutePath
    -      val testCaseName = 
absPath.stripPrefix(inputFilePath).stripPrefix(File.separator)
    -      TestCase(testCaseName, absPath, resultFile)
    +    listFilesRecursively(new File(inputFilePath)).flatMap { file =>
    +      testCases(file.getAbsolutePath)
    +    }
    +  }
    +
    +  private def testCases(inputPath: String): Seq[TestCase] = {
    +    val baseResultFileName = inputPath.replace(inputFilePath, 
goldenFilePath)
    +    val testCaseName = 
inputPath.stripPrefix(inputFilePath).stripPrefix(File.separator)
    +    testConfigs.get(testCaseName) match {
    --- End diff --
    
    Honestly I do not really like this idea @maropu, it puts an extra effort 
which is not really needed...


---

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

Reply via email to