Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-27901 Improve the error messages of SQL parser
  3. SPARK-27906

Improve parser error message for CREATE LOCAL TEMPORARY TABLE statement

    XMLWordPrintableJSON

    Details

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

      Description

      The CREATE LOCAL TEMPORARY TABLE statement is actually not supported in Spark SQL. However, when a user queries such a statement, the error message is confusing. For example, the error message for

      CREATE LOCAL TEMPORARY TABLE my_table (x INT);
      

      is

      no viable alternative at input 'CREATE LOCAL'(line 1, pos 7)
      

      which is misleading.
       

      One possible way to fix is to explicitly capture these statements in a grammar rule and print user-friendly error message such as

      CREATE LOCAL TEMPORARY TABLE statements are not supported.
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              manifoldQAQ Yesheng Ma
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: