vranes commented on code in PR #58852:
URL: https://github.com/apache/spark/pull/58852#discussion_r4086417103


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala:
##########
@@ -5199,7 +5199,7 @@ case class TimeBucket(
     ts: Expression,
     originTs: Expression,
     timeZoneId: Option[String] = None)
-  extends TernaryExpression with ExpectsInputTypes with 
TimeZoneAwareExpression {
+  extends TernaryExpression with ImplicitCastInputTypes with 
TimeZoneAwareExpression {

Review Comment:
   I ran the tests, it turns out string bucket sizes are not implicitly cast in 
either mode. The expected width type is a TypeCollection of abstract interval 
constraints, so ANSI’s String-to-AtomicType case does not apply. I decided to 
keep the applicable width coercion, including untyped NULL, and added ANSI and 
legacy tests for string rejection and NULL coercion.



-- 
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]

Reply via email to