Github user wangyum commented on the issue: https://github.com/apache/spark/pull/20504 Thanks @hvanhovell , the major changes is `SQLQueryTestSuite.scala`: ```scala private def listTestCases(): Seq[TestCase] = { - listFilesRecursively(new File(inputFilePath)).map { file => + listFilesRecursively(new File(inputFilePath)).flatMap { 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) + if (testCaseName.contains("typeCoercion")) { + TypeCoercionMode.values.map(_.toString).map { mode => + val fileNameWithMode = mode + File.separator + file.getName + val newTestCaseName = testCaseName.replace(file.getName, fileNameWithMode) + val newResultFile = resultFile.replace(file.getName, fileNameWithMode) + TestCase(newTestCaseName, absPath, newResultFile, mode) + }.toSeq + } else { + Seq(TestCase(testCaseName, absPath, resultFile)) + } } ``` For a [type coercion input](https://github.com/apache/spark/tree/v2.3.0-rc2/sql/core/src/test/resources/sql-tests/inputs/typeCoercion), two results are generated in different mode(`default` and `hive`). **For example**: _input_: sql/core/src/test/resources/sql-tests/inputs/typeCoercion/binaryComparison.sql _results_: sql/core/src/test/resources/sql-tests/results/typeCoercion/default/binaryComparison.sql.out sql/core/src/test/resources/sql-tests/results/typeCoercion/hive/binaryComparison.sql.out
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org