Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-6224

impala-shell exits with error "No closing quotation" with certain syntactic errors

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • None
    • None
    • Clients

    Description

      with v as (select 1)
      select foo('\\'), ('bar
      ;
      

      Pasting the above into impala-shell results in the shell exiting with an error. It should print a syntax error but the shell should not exit:

      [localhost:21000] > with v as (select 1)
                        > select foo('\\'), ('bar
                        > ;
      Traceback (most recent call last):
        File "/home/tarmstrong/Impala/incubator-impala/shell/impala_shell.py", line 1541, in <module>
          shell.cmdloop(intro)
        File "/usr/lib/python2.7/cmd.py", line 142, in cmdloop
          stop = self.onecmd(line)
        File "/home/tarmstrong/Impala/incubator-impala/shell/impala_shell.py", line 558, in onecmd
          return cmd.Cmd.onecmd(self, line)
        File "/usr/lib/python2.7/cmd.py", line 221, in onecmd
          return func(arg)
        File "/home/tarmstrong/Impala/incubator-impala/shell/impala_shell.py", line 1087, in do_with
          tokens = list(lexer)
        File "/usr/lib/python2.7/shlex.py", line 269, in next
          token = self.get_token()
        File "/usr/lib/python2.7/shlex.py", line 96, in get_token
          raw = self.read_token()
        File "/usr/lib/python2.7/shlex.py", line 172, in read_token
          raise ValueError, "No closing quotation"
      ValueError: No closing quotation
      

      The repro query is a reduced version of a more complex query reported by a customer.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              tarmstrong Tim Armstrong
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: