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

SHOW CREATE VIEW fails for view containing WHERE clause on an unsecure cluster

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Impala 2.7.0
    • Fix Version/s: Impala 2.8.0
    • Component/s: Frontend
    • Labels:
      None

      Description

      This is an unsecure cluster.(no kerberos , no sentry)

      1. SHOW CREATE VIEW on simple view works

      [x-unsecure-2.a.b.com:21000] > show create view vs2;
      Query: show create view vs2
      +---------------------------------+
      | result                          |
      +---------------------------------+
      | CREATE VIEW default.vs2 AS      |
      | SELECT * FROM default.sample_07 |
      +---------------------------------+
      

      2. But SHOW CREATE VIEW on view containing WHERE clause fails

      [x-unsecure-2.a.b.com:21000] > show create view vs1;
      Query: show create view vs1
      ERROR: AnalysisException: null
      CAUSED BY: IllegalStateException: null
      
      [x-unsecure-2.a.b.com:21000] > describe formatted vs1;
      Query: describe formatted vs1
      +------------------------------+------------------------------------------------------------------------------------+----------------------+
      | name                         | type                                                                               | comment              |
      +------------------------------+------------------------------------------------------------------------------------+----------------------+
      | # col_name                   | data_type                                                                          | comment              |
      |                              | NULL                                                                               | NULL                 |
      | code                         | STRING                                                                             | NULL                 |
      | description                  | STRING                                                                             | NULL                 |
      | total_emp                    | INT                                                                                | NULL                 |
      | salary                       | INT                                                                                | NULL                 |
      |                              | NULL                                                                               | NULL                 |
      | # Detailed Table Information | NULL                                                                               | NULL                 |
      | Database:                    | default                                                                            | NULL                 |
      | Owner:                       | root                                                                               | NULL                 |
      | CreateTime:                  | Fri Dec 02 13:39:01 PST 2016                                                       | NULL                 |
      | LastAccessTime:              | UNKNOWN                                                                            | NULL                 |
      | Protect Mode:                | None                                                                               | NULL                 |
      | Retention:                   | 0                                                                                  | NULL                 |
      | Table Type:                  | VIRTUAL_VIEW                                                                       | NULL                 |
      | Table Parameters:            | NULL                                                                               | NULL                 |
      |                              | transient_lastDdlTime                                                              | 1480714741           |
      |                              | NULL                                                                               | NULL                 |
      | # Storage Information        | NULL                                                                               | NULL                 |
      | SerDe Library:               |                                                                                    | NULL                 |
      | InputFormat:                 |                                                                                    | NULL                 |
      | OutputFormat:                |                                                                                    | NULL                 |
      | Compressed:                  | No                                                                                 | NULL                 |
      | Num Buckets:                 | 0                                                                                  | NULL                 |
      | Bucket Columns:              | []                                                                                 | NULL                 |
      | Sort Columns:                | []                                                                                 | NULL                 |
      |                              | NULL                                                                               | NULL                 |
      | # View Information           | NULL                                                                               | NULL                 |
      | View Original Text:          | SELECT * FROM default.sample_07 WHERE code IN (SELECT code FROM default.sample_07) | NULL                 |
      | View Expanded Text:          | SELECT * FROM default.sample_07 WHERE code IN (SELECT code FROM default.sample_07) | NULL                 |
      +------------------------------+------------------------------------------------------------------------------------+----------------------+
      

        Activity

        Hide
        alex.behm Alexander Behm added a comment -

        commit 1da57019ade33d85f76bfb86fa64332eea7b04eb
        Author: Dimitris Tsirogiannis <dtsirogiannis@cloudera.com>
        Date: Fri Dec 2 14:53:15 2016 -0800

        IMPALA-4579: SHOW CREATE VIEW fails for view containing a subquery

        This commit fixes an issue where a SHOW CREATE VIEW statement throws an
        analysis error if the view contains a subquery.

        Change-Id: I4a89e46a022f0ccec198b6e3e2b30230103831ce
        Reviewed-on: http://gerrit.cloudera.org:8080/5333
        Reviewed-by: Dimitris Tsirogiannis <dtsirogiannis@cloudera.com>
        Tested-by: Internal Jenkins

        Show
        alex.behm Alexander Behm added a comment - commit 1da57019ade33d85f76bfb86fa64332eea7b04eb Author: Dimitris Tsirogiannis <dtsirogiannis@cloudera.com> Date: Fri Dec 2 14:53:15 2016 -0800 IMPALA-4579 : SHOW CREATE VIEW fails for view containing a subquery This commit fixes an issue where a SHOW CREATE VIEW statement throws an analysis error if the view contains a subquery. Change-Id: I4a89e46a022f0ccec198b6e3e2b30230103831ce Reviewed-on: http://gerrit.cloudera.org:8080/5333 Reviewed-by: Dimitris Tsirogiannis <dtsirogiannis@cloudera.com> Tested-by: Internal Jenkins

          People

          • Assignee:
            dtsirogiannis Dimitris Tsirogiannis
            Reporter:
            mala_ck Mala Chikka Kempanna
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development