Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-35161 Error-handling SQL functions
  3. SPARK-40054

Restore the error handling syntax of try_cast()

    XMLWordPrintableJSON

Details

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

    Description

      For the following query

      SET spark.sql.ansi.enabled=true;
      SELECT try_cast(1/0 AS string); 

      Spark 3.3 will throw an exception for the division by zero error. In current master branch, it returns null after the refactoring PR https://github.com/apache/spark/pull/36703

       

      Attachments

        Activity

          People

            Gengliang.Wang Gengliang Wang
            Gengliang.Wang Gengliang Wang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: