uros-b commented on code in PR #56409:
URL: https://github.com/apache/spark/pull/56409#discussion_r3391348091
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/resolver/TimezoneAwareExpressionResolver.scala:
##########
@@ -63,12 +66,19 @@ class TimezoneAwareExpressionResolver(expressionResolver:
ExpressionResolver)
expressionTreeTraversal = traversals.current
)
- coercedTimezoneAwareExpression match {
+ val collapsedExpression = coercedTimezoneAwareExpression match {
case cast: Cast if traversals.current.defaultCollation.isDefined =>
tryCollapseCast(cast, traversals.current.defaultCollation.get)
case other =>
other
}
+
+ collapsedExpression match {
Review Comment:
Nit: It seems that the two sequential match blocks (collapse, then rewrite)
could be folded into one; purely cosmetic.
--
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]