Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-21272

information_schema.tables should also contain views

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: 3.1.0
    • Fix Version/s: None
    • Component/s: Database/Schema
    • Labels:
      None

      Description

      Currently it appears that INFORMATION_SCHEMA.TABLES does not contain views.

      Per the ISO SQL standard, 

      The INFORMATION_SCHEMA.TABLES table contains one row for each table including views.

      Example from Postgres:

      create table t (i int);
      create view v as select i from t;
      
      select
        table_catalog,
        table_schema,
        table_name,
        table_type
      from information_schema.tables
      where table_name in ('t','v');
      
       table_catalog | table_schema | table_name | table_type
      ---------------+--------------+------------+------------
       grahn         | public       | t          | BASE TABLE
       grahn         | public       | v          | VIEW
      

        Attachments

          Activity

            People

            • Assignee:
              daijy Daniel Dai
              Reporter:
              grahn Greg Rahn
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: