You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "cloud-fan (via GitHub)" <gi...@apache.org> on 2024/01/17 07:01:24 UTC

Re: [PR] [SPARK-46219][SQL] Unwrap cast in join predicates [spark]

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

   > if the value of bigIntCol exceeds the range of int, the result of try_cast(b.bigIntCol AS int) is null, and the result of a.intCol = try_cast(b.bigIntCol AS int) in the join condition is false
   
   This is wrong. The result will be null if one side of the binary comparison is null. In addition, it's very weird to optimize the plan in planner. Shouldn't we do it in an optimizer rule?


-- 
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-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org