uncleGen opened a new pull request #26610: [SPARK-29973][SS] Use nano time to 
avoid 'NaN'/'Infinity'
URL: https://github.com/apache/spark/pull/26610
 
 
   ### What changes were proposed in this pull request?
   
   Use nano time to calculate `processedRowsPerSecond` to avoid 'NaN'/'Infinity'
   
   ### Why are the changes needed?
   
   The `processingTimeSec` of batch may be less than 1 millis.  As 
`processingTimeSec` is calculated in millis, so `processingTimeSec` equals 0L. 
If there is no data in this batch, the `processedRowsPerSecond` equals 
`0/0.0d`, i.e. `Double.NaN`. If there are some data in this batch, the 
`processedRowsPerSecond` equals `N/0.0d`, i.e. `Double.Infinity`.
   
   
   ### Does this PR introduce any user-facing change?
   No
   
   ### How was this patch tested?
   Add new UT
   

----------------------------------------------------------------
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.
 
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]

Reply via email to