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

Improve error message for greatest/least

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.0.1, 2.1.0
    • SQL
    • None

    Description

      Greatest/least function does not have the most friendly error message for data types:

      Error in SQL statement: AnalysisException: cannot resolve 'greatest(CAST(1.0 AS DECIMAL(2,1)), "1.0")' due to data type mismatch: The expressions should all have the same type, got GREATEST (ArrayBuffer(DecimalType(2,1), StringType)).; line 1 pos 7

      We should report the human readable data type instead, rather than having "ArrayBuffer" and "StringType".

      Attachments

        Activity

          People

            petermaxlee Peter Lee
            petermaxlee Peter Lee
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: