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

SparkSQL CLIDriver parses sql statement incorrectly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 2.3.2, 2.3.3, 2.4.0
    • None
    • SQL
    • None

    Description

      SparkSQLCLIDriver parse sql statement incorrectly, because its processLine method is not correct.
      The processLine method is one method of CLIDriver, which is a class of hive-cli.
      SparkSQLCLIDriver extends CLIDriver, but it does't override processLine method.
      The spark-hive-cliet version of master branch is hive-1.2.1.spark2.
      In hive-1.2.1, the processLine method splits statement directly by ";", however, there may be a quote.
      For example:
      The statement:

      select * from table_a where column_a not like '%;';

      Will be parsed to:

      select * from table_a where column_a not like '%

       

       

      Attachments

        1. SPARK-26999.png
          39 kB
          Fei Wang

        Issue Links

          Activity

            People

              Unassigned Unassigned
              feiwang Fei Wang
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: