Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-19948

HiveCli is not splitting the command by semicolon properly if quotes are inside the string

Log workAgile BoardRank to TopRank to BottomVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.0
    • Fix Version/s: 4.0.0
    • Component/s: CLI
    • Labels:
      None

      Description

      HIVE-15297 tries to split the command by considering semicolon inside string, but it doesn't consider the case that quotes can also be inside string.

      For the following command insert into escape1 partition (ds='1', part='3') values ("abc' ");, it will fail with

      18/06/19 16:37:05 ERROR ql.Driver: FAILED: ParseException line 1:64 extraneous input ';' expecting EOF near '<EOF>'
      org.apache.hadoop.hive.ql.parse.ParseException: line 1:64 extraneous input ';' expecting EOF near '<EOF>'
      	at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:220)
      	at org.apache.hadoop.hive.ql.parse.ParseUtils.parse(ParseUtils.java:74)
      	at org.apache.hadoop.hive.ql.parse.ParseUtils.parse(ParseUtils.java:67)
      	at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:606)
      	at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1686)
      	at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1633)
      	at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1628)
      	at org.apache.hadoop.hive.ql.reexec.ReExecDriver.compileAndRespond(ReExecDriver.java:126)
      	at org.apache.hadoop.hive.ql.reexec.ReExecDriver.run(ReExecDriver.java:214)
      	at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:239)
      	at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:188)
      	at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:402)
      	at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:821)
      	at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:759)
      	at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:683)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.apache.hadoop.util.RunJar.run(RunJar.java:239)
      	at org.apache.hadoop.util.RunJar.main(RunJar.java:153)
      

        Attachments

        1. HIVE-19948.3.patch
          4 kB
          Aihua Xu
        2. HIVE-19948.2.patch
          4 kB
          Aihua Xu
        3. HIVE-19948.1.patch
          4 kB
          Aihua Xu

        Issue Links

          Activity

          $i18n.getText('security.level.explanation', $currentSelection) Viewable by All Users
          Cancel

            People

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment