tsreaper commented on code in PR #21759:
URL: https://github.com/apache/flink/pull/21759#discussion_r1099591819


##########
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/codegen/calls/SearchOperatorGen.scala:
##########
@@ -112,7 +114,7 @@ object SearchOperatorGen {
       var rangeChecks: Seq[GeneratedExpression] = 
sarg.rangeSet.asRanges.asScala.toSeq
         .map(RangeSets.map(_, rangeToExpression))
 
-      if (sarg.containsNull) {
+      if (sarg.nullAs == RexUnknownAs.TRUE) {
         rangeChecks =
           Seq(generateIsNull(target, new 
BooleanType(target.resultType.isNullable))) ++ rangeChecks
       }

Review Comment:
   You only deal with `sarg.nullAs == RexUnknownAs.TRUE` here, what about 
`sarg.nullAs == RexUnknownAs.FALSE` and `sarg.nullAs == RexUnknownAs.UNKNOWN`? 
We're facing a similar problem with the above.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to