mihailotim-db commented on code in PR #48596:
URL: https://github.com/apache/spark/pull/48596#discussion_r1812107774
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/AnsiTypeCoercion.scala:
##########
@@ -279,31 +227,19 @@ object AnsiTypeCoercion extends TypeCoercionBase {
override def transform: PartialFunction[Expression, Expression] = {
// Skip nodes who's children have not been resolved yet.
case g if !g.childrenResolved => g
-
- case g: GetDateField if AnyTimestampTypeExpression.unapply(g.child) =>
- g.withNewChildren(Seq(Cast(g.child, DateType)))
+ case withChildrenResolved
+ if
AnsiGetDateFieldOperationsTypeCoercion.apply.isDefinedAt(withChildrenResolved)
=>
+ AnsiGetDateFieldOperationsTypeCoercion.apply(withChildrenResolved)
}
}
object DateTimeOperations extends TypeCoercionRule {
Review Comment:
Done
--
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]