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

Impala receives truncated query when pasting a large amount of text into impala-shell

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • Impala 2.0, Impala 2.2, impala 2.3
    • None
    • Clients

    Description

      With attached case_full.sql, I got AnalysisException during parsing when pasting the whole content into impala-shell such as:

      ERROR: AnalysisException: Syntax error in line 25:
      left outer join (select skpk...
      ^
      Encountered: LEFT
      Expected: AND, AS, BETWEEN, DIV, IN, IS, LIKE, NOT, OR, REGEXP, RLIKE, COMMA, IDENTIFIER

      CAUSED BY: Exception: Syntax error

      The query is correct and can be executed in Hive when pasting into Hive CLI. The error point is not fixed, randomly happening when the query is larger enough.

      Some steps already done to identify this cause:
      1. Pasting to a query_file and execution is ok with -f query_file
      2. execution is ok when disabling readline support in impala-shell.py
      3. This issue seems caused by a readline bug which is still not resolved:
      https://lists.gnu.org/archive/html/bug-readline/2013-07/msg00019.html

      As an improvement, is it possible to provide an option to disable usage of readline in impala-shell.py, so that pasting large amount of text is ok?

      Attachments

        1. case_full.sql
          88 kB
          Xiaomin Zhang

        Activity

          People

            Unassigned Unassigned
            ximz Xiaomin Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: