You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
In Analysis.jobAndStageMetricsAggregation there is a bunch of code to do aggregations and they all have this Option pattern when doing the aggregations. But the problem is Option only becomes a None if a null is passed in. We are not passing in nulls in this case, we are passing in an empty ArrayBuffer if there are no tasks. For the sum aggregations it is not a problem and they still output 0 when summing an empty list. But for max it throws an error. We need an alternative way to compute the max and return 0 when there are no values. The Option code is doing nothing because there is no way to return a null from tasksInJob.map(_.SOMETHING) if tasksInJob is empty you get an empty list. If it is null you get an NPE from trying to call map on it.
The text was updated successfully, but these errors were encountered:
Describe the bug
In
Analysis.jobAndStageMetricsAggregation
there is a bunch of code to do aggregations and they all have this Option pattern when doing the aggregations. But the problem is Option only becomes a None if a null is passed in. We are not passing in nulls in this case, we are passing in an empty ArrayBuffer if there are no tasks. For the sum aggregations it is not a problem and they still output 0 when summing an empty list. But for max it throws an error. We need an alternative way to compute the max and return 0 when there are no values. The Option code is doing nothing because there is no way to return a null fromtasksInJob.map(_.SOMETHING)
if tasksInJob is empty you get an empty list. If it is null you get an NPE from trying to call map on it.The text was updated successfully, but these errors were encountered: