aokolnychyi commented on code in PR #51146:
URL: https://github.com/apache/spark/pull/51146#discussion_r2159746143


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/V2ExpressionBuilder.scala:
##########
@@ -78,6 +78,7 @@ class V2ExpressionBuilder(e: Expression, isPredicate: Boolean 
= false) extends L
       expr: Expression, isPredicate: Boolean = false): Option[V2Expression] = 
expr match {
     case Literal(true, BooleanType) => Some(new AlwaysTrue())
     case Literal(false, BooleanType) => Some(new AlwaysFalse())
+    case Cast(Literal(null, NullType), BooleanType, _, _) if isPredicate => 
Some(new AlwaysNull())

Review Comment:
   Hm, doing the conversion to V2 predicate in `ResolveTableSpec` overall means 
we will not be able to optimize the conditions before the conversion... This is 
unlucky.



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


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

Reply via email to