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

Impala shell not displaying results for a CTE query.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: Impala 3.1.0
    • Fix Version/s: Impala 3.2.0
    • Component/s: None
    • Labels:
      None
    • Epic Color:
      ghx-label-5

      Description

      1.
      
      [localhost:21000] > CREATE TABLE test (cp_master_id STRING, data_status STRING) stored as parquet;
       Query: CREATE TABLE test (cp_master_id STRING, data_status STRING) stored as parquet
       Fetched 0 row(s) in 0.03s
      
      2. 
      
      [localhost:21000] > insert into test (cp_master_id, data_status) values ('11111111111','NEWREC');
       Query: insert into test (cp_master_id, data_status) values ('11111111111','NEWREC')
       Query submitted at: 2018-12-06 14:02:21 (Coordinator: [http://anuj-OptiPlex-9020:25000|http://anuj-optiplex-9020:25000/])
       Query progress can be monitored at: [http://anuj-OptiPlex-9020:25000/query_plan?query_id=14182abf0a7e4bb:8788cdab00000000|http://anuj-optiplex-9020:25000/query_plan?query_id=14182abf0a7e4bb:8788cdab00000000]
       Modified 1 row(s) in 4.14s
      
      ***********************************************************************************
      
      3.
       [localhost:21000] > WITH tbl_incoming
       > AS
       > (
       > SELECT cp_master_id, data_status FROM test WHERE (data_status = 'NEWREC' OR data_status='UPDATE')
       > )
       > select * from test;
       Query: WITH tbl_incoming
       AS
       (
       SELECT cp_master_id, data_status FROM test WHERE (data_status = 'NEWREC' OR data_status='UPDATE')
       )
       select * from test
       Modified 0 row(s) in 0.12s
       [localhost:21000] >
      
       
      
      4.
      
      [localhost:21000] > SELECT cp_master_id, data_status FROM test WHERE (data_status = 'NEWREC' OR data_status='UPDATE');
       Query: SELECT cp_master_id, data_status FROM test WHERE (data_status = 'NEWREC' OR data_status='UPDATE')
       Query submitted at: 2018-12-06 14:05:48 (Coordinator: [http://anuj-OptiPlex-9020:25000|http://anuj-optiplex-9020:25000/])
       Query progress can be monitored at: [http://anuj-OptiPlex-9020:25000/query_plan?query_id=4b49d50ec0b973c1:ce474a1500000000|http://anuj-optiplex-9020:25000/query_plan?query_id=4b49d50ec0b973c1:ce474a1500000000]
       +----------------+-----------+
      |cp_master_id|data_status|
      
      +----------------+-----------+
      |11111111111|NEWREC|
      
      +----------------+-----------+
       Fetched 1 row(s) in 0.12s
      

       

      I think the bug is in the regex here -
      https://github.com/apache/impala/blob/master/shell/impala_shell.py#L1157

      It matches for "UPDATE" -
      https://github.com/apache/impala/blob/master/shell/impala_shell.py#L139

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                fredyw Fredy Wijaya
                Reporter:
                anujphadke Anuj Phadke
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: