Github user wangyum commented on a diff in the pull request:
https://github.com/apache/spark/pull/20504#discussion_r166156332
--- Diff:
sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala ---
@@ -250,11 +257,20 @@ class SQLQueryTestSuite extends QueryTest with
SharedSQLContext {
}
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)
--- End diff --
Thanks @dongjoon-hyun, There are 3 files are different:
`hive/binaryComparison.sql.out`, `hive/decimalPrecision.sql.out` and
`hive/promoteStrings.sql.out` something like this:
https://github.com/wangyum/spark/commit/927f6e86712ec4da4d58dbde2859b48520df3194
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]