Github user wajda commented on a diff in the pull request:
https://github.com/apache/spark/pull/21155#discussion_r187195445
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercion.scala
---
@@ -536,6 +536,15 @@ object TypeCoercion {
case None => c
}
+ case s @ Sequence(_, _, _, timeZoneId) if !haveSameType(s.children)
=>
+ val types = s.children.map(_.dataType)
+ findWiderCommonType(types) match {
--- End diff --
Good catch, thank you. I've added a unit test and fixed coercion when the
step is interval.
Regarding ```ImplicitCastInputTypes ``` I tried it, but it isn't flexible
enough for my case. To support actual type coercion for both integral and
temporal sequences I had to resort to ```TypeCoercion```. Please check the
fixed version. Is there any better way how to do it?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]