[
https://issues.apache.org/jira/browse/HIVE-21272?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Greg Rahn updated HIVE-21272:
-----------------------------
Description:
Currently it appears that INFORMATION_SCHEMA.TABLES does not contain views.
Per the ISO SQL standard,
{quote}
The INFORMATION_SCHEMA.TABLES table contains one row for each table
{color:red}including views.{color}
{quote}
Example from Postgres:
{noformat}
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
{noformat}
was:
Currently it appears that INFORMATION_SCHEMA.TABLES does not contain views.
Per the ISO SQL standard,
{quote}
The INFORMATION_SCHEMA.TABLES table contains one row for each table
{color:red}including views.{color}
{quote}
Example from Postgres:
{noformat}
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_schema = 'public'
and table_name in ('t','v');
table_catalog | table_schema | table_name | table_type
---------------+--------------+------------+------------
grahn | public | t | BASE TABLE
grahn | public | v | VIEW
{noformat}
> information_schema.tables should also contain views
> ---------------------------------------------------
>
> Key: HIVE-21272
> URL: https://issues.apache.org/jira/browse/HIVE-21272
> Project: Hive
> Issue Type: Bug
> Components: Database/Schema
> Affects Versions: 3.1.0
> Reporter: Greg Rahn
> Priority: Critical
>
> Currently it appears that INFORMATION_SCHEMA.TABLES does not contain views.
> Per the ISO SQL standard,
> {quote}
> The INFORMATION_SCHEMA.TABLES table contains one row for each table
> {color:red}including views.{color}
> {quote}
> Example from Postgres:
> {noformat}
> 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
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)