We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bcae336 commit 51f7fb9Copy full SHA for 51f7fb9
sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala
@@ -163,7 +163,12 @@ class SQLQueryTestSuite extends QueryTest with SharedSQLContext {
163
s"-- Number of queries: ${outputs.size}\n\n\n" +
164
outputs.zipWithIndex.map{case (qr, i) => qr.toString(i)}.mkString("\n\n\n") + "\n"
165
}
166
- stringToFile(new File(testCase.resultFile), goldenOutput)
+ val resultFile = new File(testCase.resultFile);
167
+ val parent = resultFile.getParentFile();
168
+ if (!parent.exists()) {
169
+ assert(parent.mkdirs(), "Could not create directory: " + parent)
170
+ }
171
+ stringToFile(resultFile, goldenOutput)
172
173
174
// Read back the golden file.
0 commit comments