wzhfy commented on code in PR #41162: URL: https://github.com/apache/spark/pull/41162#discussion_r1197253055
########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/predicates.scala: ########## @@ -509,16 +509,25 @@ case class In(value: Expression, list: Seq[Expression]) extends Predicate { val valueArg = ctx.freshName("valueArg") // All the blocks are meant to be inside a do { ... } while (false); loop. // The evaluation of variables can be stopped when we find a matching value. - val listCode = listGen.map(x => - s""" - |${x.code} - |if (${x.isNull}) { - | $tmpResult = $HAS_NULL; // ${ev.isNull} = true; - |} else if (${ctx.genEqual(value.dataType, valueArg, x.value)}) { - | $tmpResult = $MATCHED; // ${ev.isNull} = false; ${ev.value} = true; - | continue; - |} - """.stripMargin) + val listCode = listGen.map { x => + val codeIf = + s""" + |${x.code} + |if (${x.isNull}) { + | $tmpResult = $HAS_NULL; // ${ev.isNull} = true; + |} + """.stripMargin + val codeElseIf = + if (!java.lang.Boolean.parseBoolean(x.isNull.toString)) { Review Comment: better to add a comment here -- 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. To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org