wangyum commented on code in PR #40743:
URL: https://github.com/apache/spark/pull/40743#discussion_r1164229328
##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/UnwrapCastInBinaryComparisonSuite.scala:
##########
@@ -392,9 +392,8 @@ class UnwrapCastInBinaryComparisonSuite extends PlanTest
with ExpressionEvalHelp
(f5 >= castTimestamp(dateLit) && f5 < castTimestamp(dateAddOne)) ||
(f6 >= castTimestampNTZ(dateLit) && f6 < castTimestampNTZ(dateAddOne)))
assertEquivalent(
- castDate(f5) <=> dateLit || castDate(f6) === dateLit,
- (f5 >= castTimestamp(dateLit) && f5 < castTimestamp(dateAddOne)) ||
- (f6 >= castTimestampNTZ(dateLit) && f6 < castTimestampNTZ(dateAddOne)))
+ castDate(f5) <=> dateLit || castDate(f6) <=> dateLit,
+ (f5 >= castTimestamp(dateLit) && f5 < castTimestamp(dateAddOne)) ||
castDate(f6) <=> dateLit)
Review Comment:
timestamp is non nullable and timestampNTZ is null able.
`castDate(f5) <=> dateLit` test non nullable and `castDate(f6) <=> dateLit`
test nullable.
--
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]