windpiger opened a new pull request #25095: [SPARK-28332][SQL] SQLMetric wrong 
initValue
URL: https://github.com/apache/spark/pull/25095
 
 
   ## What changes were proposed in this pull request?
   Currently SQLMetrics.createSizeMetric create a SQLMetric with initValue set 
to -1.
   
   If there is a ShuffleMapStage with lots of Tasks which read 0 bytes data, 
these tasks will send the metric(the metric value still be the initValue with 
-1) to Driver,  then Driver do metric merge for this Stage in 
DAGScheduler.updateAccumulators, this will cause the merged metric value of 
this Stage set to be a negative value. 
   
   This is incorrect, we should set the initValue to 0 .
   
   Another same case in SQLMetrics.createTimingMetric/createNanoTimingMetric
   
   ## How was this patch tested?
   

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