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

Group SQL component error messages in Spark error class JSON file

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.2.0
    • None
    • Spark Core, SQL
    • None

    Description

      To improve auditing, reduce duplication, and improve quality of error messages thrown from Spark, we should group them in a single JSON file (as discussed in the mailing list and introduced in SPARK-34920).
      In this file, the error messages should be labeled according to a consistent error class and with a SQLSTATE.

      We will start with the SQL component first.
      As a starting point, we can build off the exception grouping done in SPARK-33539. In total, there are ~1000 error messages to group split across three files (QueryCompilationErrors, QueryExecutionErrors, and QueryParsingErrors). In this ticket, each of these files is split into chunks of ~20 errors for refactoring.

      Here is an example PR that groups a few error messages in the QueryCompilationErrors class: PR 33309.

      Guidelines:

      • Error classes should be unique and sorted in alphabetical order.
      • Error classes should be unified as much as possible to improve auditing. If error messages are similar, group them into a single error class and add parameters to the error message.
      • SQLSTATE should match the ANSI/ISO standard, without introducing new classes or subclasses. See the error guidelines; if none of them match, the SQLSTATE field should be empty.
      • The Throwable should extend SparkThrowable; see SparkArithmeticException as an example of how to mix SparkThrowable into a base Exception type.

      We will improve error message quality as a follow-up.

      Attachments

        1.
        Refactor second set of 20 query execution errors to use error classes Sub-task In Progress Unassigned
        2.
        Refactor third set of 20 query execution errors to use error classes Sub-task In Progress Unassigned
        3.
        Refactor fourth set of 20 query execution errors to use error classes Sub-task In Progress Unassigned
        4.
        Refactor fifth set of 20 query execution errors to use error classes Sub-task In Progress Unassigned
        5.
        Refactor sixth set of 20 query execution errors to use error classes Sub-task Open Unassigned
        6.
        Refactor seventh set of 20 query execution errors to use error classes Sub-task In Progress Unassigned
        7.
        Refactor eighth set of 20 query execution errors to use error classes Sub-task Open Unassigned
        8.
        Refactor ninth set of 20 query execution errors to use error classes Sub-task Open Unassigned
        9.
        Refactor tenth set of 20 query execution errors to use error classes Sub-task Open Unassigned
        10.
        Refactor eleventh set of 20 query execution errors to use error classes Sub-task In Progress Unassigned
        11.
        Refactor twelfth set of 20 query execution errors to use error classes Sub-task Open Unassigned
        12.
        Refactor thirteenth set of 20 query execution errors to use error classes Sub-task In Progress Unassigned
        13.
        Refactor fourteenth set of 20 query execution errors to use error classes Sub-task In Progress Unassigned
        14.
        Refactor fifteenth set of 20 query execution errors to use error classes Sub-task In Progress Unassigned
        15.
        Refactor sixteenth set of 20 query execution errors to use error classes Sub-task Open Unassigned
        16.
        Refactor seventeenth set of 20 query execution errors to use error classes Sub-task Open Unassigned
        17.
        Refactor first set of 20 query parsing errors to use error classes Sub-task In Progress Unassigned
        18.
        Refactor second set of 20 query parsing errors to use error classes Sub-task Open Unassigned
        19.
        Refactor third set of 20 query parsing errors to use error classes Sub-task Open Unassigned
        20.
        Refactor fourth set of 20 query parsing errors to use error classes Sub-task Open Unassigned
        21.
        Refactor first set of 20 query compilation errors to use error classes Sub-task Open Unassigned

        Activity

          People

            Unassigned Unassigned
            karenfeng Karen Feng
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: