Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-33539 Standardize exception messages in Spark
  3. SPARK-34744

Improve error message for casting cause overflow error

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.2.0
    • 3.2.0
    • SQL
    • None

    Description

      For example:

      set spark.sql.ansi.enabled=true;
      select tinyint(128) * tinyint(2);
      

      Error message:

      Casting 128 to scala.Byte$ causes overflow
      

      Expected:

      Casting 128 to tinyint causes overflow
      

      We should use DataType's catalogString.

      Attachments

        Activity

          People

            angerszhuuu angerszhu
            yumwang Yuming Wang
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: