Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-28589 Introduce a new type coercion mode by following PostgreSQL
  3. SPARK-28512

New optional mode: throw runtime exceptions on casting failures

    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.0
    • Fix Version/s: 3.0.0
    • Component/s: SQL
    • Labels:
      None

      Description

      In popular DBMS like MySQL/PostgreSQL/Oracle, runtime exceptions are thrown on casting, e.g. cast('abc' as boolean)
      While in Spark, the result is converted as null silently. It is by design since we don't want a long-running job aborted by some casting failure. But there are scenarios that users want to make sure all the data conversion are correct, like the way they use MySQL/PostgreSQL/Oracle.

      This one has a bigger scope than https://issues.apache.org/jira/browse/SPARK-28741

        Attachments

          Activity

            People

            • Assignee:
              Gengliang.Wang Gengliang Wang
              Reporter:
              Gengliang.Wang Gengliang Wang
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: