cloud-fan commented on PR #45589:
URL: https://github.com/apache/spark/pull/45589#issuecomment-2048842691

   With hindsight, we shouldn't create the v2 `Predicate` API in the first 
place, and should just use the v2 `Expression` API. The `Predicate` trait in 
catalyst is not useful as well. Some expressions can return different data 
types, including boolean type, it's hard to classify them.
   
   It's too late to change the API now. One suggestion is to follow how we 
handle CASE WHEN: always use v2 `Predicate` if this expression may return 
boolean type. v2 `Predicate` extends `GeneralScalarExpression`, so this is fine.


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