Last-remote11 commented on code in PR #52388: URL: https://github.com/apache/spark/pull/52388#discussion_r2361362942
########## sql/core/src/test/scala/org/apache/spark/sql/execution/adaptive/AdaptiveQueryExecSuite.scala: ########## @@ -744,16 +743,22 @@ class AdaptiveQueryExecSuite // if the right side is completed first and the left side is still being executed, // the right side does not know whether there are many empty partitions on the left side, // so there is no demote, and then the right side is broadcast in the planning stage. - // so retry several times here to avoid unit test failure. - eventually(timeout(15.seconds), interval(500.milliseconds)) { + // so apply `slow_udf` to delay right side to avoid unit test failure. + withUserDefinedFunction("slow_udf" -> true) { + spark.udf.register("slow_udf", (x: Int) => { + Thread.sleep(300) Review Comment: Yes, I picked just a random magic number and there's no specific reason. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org