Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-19544

Improve error message when some column types are compatible and others are not in set/union operations

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.2.0
    • 2.2.0
    • SQL
    • None

    Description

      Currently,

      Seq((1,("a", 1))).toDF union Seq((1L,("a", "b"))).toDF
      org.apache.spark.sql.AnalysisException: Union can only be performed on tables with the compatible column types. LongType <> IntegerType at the first column of the second table;;
      

      It prints that it fails due to LongType <> IntegerType whereas actually it is StructType(...) <> StructType(...)

      Attachments

        Activity

          People

            gurwls223 Hyukjin Kwon
            gurwls223 Hyukjin Kwon
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: