Github user HyukjinKwon commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16057#discussion_r90153808
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercion.scala
 ---
    @@ -714,6 +714,17 @@ object TypeCoercion {
             // try to find the first one we can implicitly cast.
             case (_, TypeCollection(types)) => types.flatMap(implicitCast(e, 
_)).headOption.orNull
     
    +        case (ArrayType(_, nullable), ArrayType(internalType: DataType, 
expectedNullable))
    +          if (expectedNullable || nullable == expectedNullable) =>
    --- End diff --
    
    Ah, actually @hvanhovell, in case of `case _ if 
expectedType.acceptsType(inType) => inType` would this return `None` instead of 
the same input type? 
    
    I see this is being used by `implicitCast(in, expected).getOrElse(in)` so 
it would be fine to work but I am worried of this (e.g. for unit test and etc).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to