cloud-fan commented on a change in pull request #23440:
[SPARK-26526][SQL][TEST] Fix invalid test case about non-deterministic
expression
URL: https://github.com/apache/spark/pull/23440#discussion_r245075915
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/DataFrameSuite.scala
##########
@@ -1398,11 +1398,15 @@ class DataFrameSuite extends QueryTest with
SharedSQLContext {
}
test("SPARK-10316: respect non-deterministic expressions in
PhysicalOperation") {
- val input = spark.read.json((1 to 10).map(i => s"""{"id": $i}""").toDS())
+ withTempDir { dir =>
+ val tempJsonFile = new File(dir, "tmp_json")
Review comment:
we can use `withTempPath` and write to the path directly.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]