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

Check error classes in CreateNamespaceParserSuite

    XMLWordPrintableJSON

Details

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

    Description

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

          intercept(
            "CREATE NAMESPACE a.b.c WITH PROPERTIES('key_without_value', 'key_with_value'='x')",
            "Operation not allowed: Values must be specified for key(s): [key_without_value]")
      

      by

      checkError(
            exception = parseException( "CREATE NAMESPACE a.b.c WITH PROPERTIES('key_without_value', 'key_with_value'='x')"),
            errorClass = "...",
            parameters = Map.empty,
            context = ...)
      

      at https://github.com/apache/spark/blob/35d00df9bba7238ad4f409999617fae4d04ddbfd/sql/core/src/test/scala/org/apache/spark/sql/execution/command/CreateNamespaceParserSuite.scala#L75-L77

      Attachments

        Issue Links

          Activity

            People

              panbingkun BingKun Pan
              maxgekk Max Gekk
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: