MaxGekk commented on code in PR #56409:
URL: https://github.com/apache/spark/pull/56409#discussion_r3391786602
##########
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:
Done in cce7a21 - folded the collapse and the nanos rewrite into a single
`Cast` match in `resolve`. Non-casts pass through; a cast is collapsed only
when a default collation is present and then run through
`rewriteDateNanosCast`, so the behavior is unchanged.
`TimezoneAwareExpressionResolverSuite` and the dual-run suite still pass.
--
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]