Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-37935 Migrate onto error classes
  3. SPARK-40762

Check error classes in ErrorParserSuite

    XMLWordPrintableJSON

Details

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

    Description

      Check error classes in ErrorParserSuite by using checkError(). For instance, replace

      intercept("select *\nfrom r\norder by q\ncluster by q", 3, 0, 11,
            "Combination of ORDER BY/SORT BY/DISTRIBUTE BY/CLUSTER BY is not supported",
            "^^^")
      

      by

      checkError(
            exception = parseException("select *\nfrom r\norder by q\ncluster by q"),
            errorClass = "_LEGACY_ERROR_TEMP_0011",
            parameters = Map.empty,
            context = ExpectedContext(fragment = "order by q\ncluster by q", start = 16, stop = 38))
      

      at https://github.com/apache/spark/blob/96ed6dc3e38b22b4aefc41e20ba7c953f8f2251e/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/ErrorParserSuite.scala#L79-L83

      Attachments

        Issue Links

          Activity

            People

              maxgekk Max Gekk
              maxgekk Max Gekk
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: