hvanhovell commented on a change in pull request #22054: [SPARK-24703][SQL]:
To add support to multiply CalendarInterval with Integral Type.
URL: https://github.com/apache/spark/pull/22054#discussion_r302128416
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercion.scala
##########
@@ -837,6 +837,10 @@ object TypeCoercion {
Cast(TimeAdd(l, r), l.dataType)
case Subtract(l, r @ CalendarIntervalType()) if
acceptedTypes.contains(l.dataType) =>
Cast(TimeSub(l, r), l.dataType)
+ case Multiply(l @ CalendarIntervalType(), r @ IntegerType()) =>
Review comment:
I think you need to make the type checking less strict to make implicit
casting work. Can you drop the check for `IntegerType`?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]