Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/21602#discussion_r197011139
--- Diff:
sql/core/src/test/scala/org/apache/spark/sql/DatasetCacheSuite.scala ---
@@ -132,4 +132,19 @@ class DatasetCacheSuite extends QueryTest with
SharedSQLContext with TimeLimits
df.unpersist()
assert(df.storageLevel == StorageLevel.NONE)
}
+
+ test("SPARK-24613 Cache with UDF could not be matched with subsequent
dependent caches") {
+ val expensiveUDF = udf({x: Int => Thread.sleep(10000); x})
--- End diff --
can we use accumulators and make sure this UDF only run 10 times? sleeping
10 seconds is not good in a unit test
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]