leanken commented on pull request #29983:
URL: https://github.com/apache/spark/pull/29983#issuecomment-706833973


   > Seems plausible to me.
   
   ```
   case class CovSample(left: Expression, right: Expression) extends 
Covariance(left, right) {
     override val evaluateExpression: Expression = {
       If(n === 0.0, Literal.create(null, DoubleType),
         If(n === 1.0, Double.NaN, ck / (n - 1.0)))
     }
   
   case class Corr(x: Expression, y: Expression)
     extends PearsonCorrelation(x, y) {
   
     override val evaluateExpression: Expression = {
       If(n === 0.0, Literal.create(null, DoubleType),
         If(n === 1.0, Double.NaN, ck / sqrt(xMk * yMk)))
     }
   ```
   
   found two more place return Double.NaN with DivideByZero case. should I 
update these as well??
   
   


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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to