Skip to content

Commit

Permalink
Update spark/src/test/scala/org/apache/comet/CometExpressionCoverageS…
Browse files Browse the repository at this point in the history
…uite.scala

Co-authored-by: advancedxy <[email protected]>
  • Loading branch information
comphead and advancedxy authored May 9, 2024
1 parent 88795f3 commit 5bc9a27
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,9 @@ class CometExpressionCoverageSuite extends CometTestBase with AdaptiveSparkPlanH
sys.error("DATAFUSIONCLI_PATH env variable not set"))

val tempFilePath = Files.createTempFile("temp-", ".sql")
try {
Files.write(tempFilePath, sql.getBytes)

val command = s"""$datafusionCliPath/datafusion-cli -f $tempFilePath"""

val stdout = new StringBuilder
Expand All @@ -225,8 +226,9 @@ class CometExpressionCoverageSuite extends CometTestBase with AdaptiveSparkPlanH
out => stdout.append(out).append("\n"), // stdout
err => stderr.append(err).append("\n") // stderr
))

Files.delete(tempFilePath)
} finally {
Files.delete(tempFilePath)
}

val err = stderr.toString()
val out = stdout.toString()
Expand Down

0 comments on commit 5bc9a27

Please sign in to comment.