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

information_schema.tables should also contain views

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • 3.1.0
    • None
    • Database/Schema
    • 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

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

            Dates

              Created:
              Updated: