viirya commented on code in PR #44480:
URL: https://github.com/apache/spark/pull/44480#discussion_r1436595319
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/UnwrapCastInBinaryComparison.scala:
##########
@@ -144,6 +144,15 @@ object UnwrapCastInBinaryComparison extends
Rule[LogicalPlan] {
value != null =>
Some(unwrapTimestampToDate(be, fromExp, ts, timeZoneId, evalMode))
+ // Timestamp/Timestamp_NTZ -> Timestamp_NTZ/Timestamp
Review Comment:
I use `Cast.eval` instead of `convertTz` directly because otherwise we need
to handle timestamp -> timestamp_ntz and timestamp_ntz -> timestamp two cases
here. Let me know if you prefer we use `convertTz` directly 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: [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]