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

quote in WITH block's comment breaks shell

    XMLWordPrintableJSON

Details

    Description

      Steps to reproduce:

      $ cat > test.sql
      with a as (
      select 'a'
      – shouldn't matter
      )
      select * from a;
      $ impala-shell -f test.sql
      /usr/bin/impala-shell: line 32: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
      /usr/bin/impala-shell: line 32: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
      Starting Impala Shell without Kerberos authentication
      Connected to host:21000
      Server version: impalad version 2.2.0-cdh5 RELEASE (build 1d0b017e2441dd8950924743d839f14b3995e259)
      Traceback (most recent call last):
      File "/usr/lib/impala-shell/impala_shell.py", line 1006, in <module>
      execute_queries_non_interactive_mode(options)
      File "/usr/lib/impala-shell/impala_shell.py", line 922, in execute_queries_non_interactive_mode
      if shell.onecmd(query) is CmdStatus.ERROR:
      File "/usr/lib64/python2.6/cmd.py", line 219, in onecmd
      return func(arg)
      File "/usr/lib/impala-shell/impala_shell.py", line 762, in do_with
      tokens = list(lexer)
      File "/usr/lib64/python2.6/shlex.py", line 269, in next
      token = self.get_token()
      File "/usr/lib64/python2.6/shlex.py", line 96, in get_token
      raw = self.read_token()
      File "/usr/lib64/python2.6/shlex.py", line 172, in read_token
      raise ValueError, "No closing quotation"
      ValueError: No closing quotation

      Also, copy-pasting the query interactively, the line never closes.

      Strangely, the issue only seems to occur in presence of the WITH block.

      Attachments

        Issue Links

          Activity

            People

              fredyw Fredy Wijaya
              szama_impala_6295 Marcell Szabo
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: