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

SQL fails to parse when comment contains an unmatched quote character

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.0
    • 3.0.0, 3.1.0
    • SQL
    • None

    Description

      A SQL statement that contains a comment with an unmatched quote character can lead to a parse error. These queries parsed correctly in older versions of Spark. For example, here's an excerpt from an interactive spark-sql session on a recent Spark-3.0.0-SNAPSHOT build (commit e23c135e568d4401a5659bc1b5ae8fc8bf147693):

      spark-sql> SELECT 1 -- someone's comment here
               > ;
      Error in query: 
      extraneous input ';' expecting <EOF>(line 2, pos 0)
      
      == SQL ==
      SELECT 1 -- someone's comment here
      ;
      ^^^
      

      Attachments

        Issue Links

          Activity

            People

              javier_ivanov Javier Fuentes
              jlowe Jason Darrell Lowe
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: