Github user rxin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/7523#discussion_r34969987
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/nullFunctions.scala
 ---
    @@ -198,14 +203,39 @@ case class AtLeastNNonNulls(n: Int, children: 
Seq[Expression]) extends Predicate
         val nonnull = ctx.freshName("nonnull")
         val code = children.map { e =>
           val eval = e.gen(ctx)
    -      s"""
    -        if ($nonnull < $n) {
    -          ${eval.code}
    -          if (!${eval.isNull}) {
    -            $nonnull += 1;
    -          }
    -        }
    -      """
    +      e.dataType match {
    +        case DoubleType =>
    +          s"""
    +            if ($nonnull < $n) {
    +              ${eval.code}
    +              if (!${eval.isNull}) {
    +                if (!Double.isNaN(${eval.primitive})) {
    --- End diff --
    
    let's leave that for future prs. don't think it is that big of a deal if 
they are already in the codebase.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to