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

    https://github.com/apache/spark/pull/16882#discussion_r100667599
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala
 ---
    @@ -321,12 +321,12 @@ trait CheckAnalysis extends PredicateHelper {
                   // Check if the data types match.
                   dataTypes(child).zip(ref).zipWithIndex.foreach { case ((dt1, 
dt2), ci) =>
                     // SPARK-18058: we shall not care about the nullability of 
columns
    -                if (!dt1.sameType(dt2)) {
    +                if (TypeCoercion.findWiderTypeForTwo(dt1.asNullable, 
dt2.asNullable).isEmpty) {
                       failAnalysis(
                         s"""
                           |${operator.nodeName} can only be performed on 
tables with the compatible
    -                      |column types. $dt1 <> $dt2 at the 
${ordinalNumber(ci)} column of
    -                      |the ${ordinalNumber(ti + 1)} table
    +                      |column types. ${dt1.simpleString} <> 
${dt2.simpleString} at the
    --- End diff --
    
    (I used `simpleString` for consistency with other codes in this)


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