Github user viirya commented on a diff in the pull request:
https://github.com/apache/spark/pull/21568#discussion_r195920603
--- 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 --
Once a test is renamed, it might silently turn to default test config. To
avoid that, maybe we should explicitly define which test case needs to run
against custom configs.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]