heyihong commented on code in PR #53801:
URL: https://github.com/apache/spark/pull/53801#discussion_r2716969817
##########
sql/api/src/main/scala/org/apache/spark/sql/Observation.scala:
##########
@@ -130,7 +129,7 @@ class Observation(val name: String) {
* the observed metrics as a `Row`, or None if the metrics are not
available.
*/
private[sql] def getRowOrEmpty: Option[Row] = {
- Try(SparkThreadUtils.awaitResult(future, 100.millis)).toOption
+ future.value.flatMap(_.toOption)
Review Comment:
@hvanhovell The visibility of getRowOrEmpty is private[sql], and it is used
only in the Connect server. So the only change is that if the observed metrics
processing time takes longer than 100 ms to finish, the previous implementation
returned an empty result, but after this change it returns the observed
metrics. IMHO, it is a stability fix rather than a behavior change.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]