Vaibhav Gumashta created HIVE-21137:
---------------------------------------

             Summary: JDBC: HiveDatabaseMetaData.getTables does not adhere to 
jdbc spec
                 Key: HIVE-21137
                 URL: https://issues.apache.org/jira/browse/HIVE-21137
             Project: Hive
          Issue Type: Bug
          Components: JDBC
    Affects Versions: 2.3.4, 3.1.1
            Reporter: Vaibhav Gumashta
         Attachments: HiveJdbcClient.java

The {{types}} parameter in {{HiveDatabaseMetaData.getTable(String catalog, 
String schemaPattern, String tableNamePattern, String[] types)}} is supposed to 
honor only the return values from  {{HiveDatabaseMetaData.getTableTypes}}. 
However following is the output from the attached test jdbc programs: 

{code}
*** Using dbMetadata.getTables ***


*** With only EXTERNAL TABLE ***
Table: test1
Table: test_2
Table: names_text
Table: names_text_1


*** With only TABLE ***
Table: test1
Table: test_2
Table: names_text
Table: names_text_1


*** With only EXTERNAL_TABLE ***
Table: test1
Table: test_2
Table: names_text
Table: names_text_1


*** With empty array ***
Table: test1
Table: test_2
Table: names_text
Table: names_text_1


*** With VIEW ***


*** With INDEX_TABLE ***
Table: test1
Table: test_2
Table: names_text
Table: names_text_1


*** With VIEW, INDEX_TABLE ***


*** With EXTERNAL_TABLE, VIEW, INDEX_TABLE ***


*** With TABLE, VIEW, INDEX_TABLE ***
Table: test1
Table: test_2
Table: names_text
Table: names_text_1


*** With a random string ***
Table: test1
Table: test_2
Table: names_text
Table: names_text_1


*** getTableTypes ***
Table: TABLE
Table: TABLE
Table: VIEW
Table: MATERIALIZED_VIEW
{code}

We should fix the api so that clients can see expected behaviour.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to