hadoop-hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Sichi (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HIVE-1126) Missing some Jdbc functionality like getTables getColumns and HiveResultSet.get* methods based on column name.
Date Thu, 11 Feb 2010 22:40:28 GMT

    [ https://issues.apache.org/jira/browse/HIVE-1126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12832712#action_12832712

John Sichi commented on HIVE-1126:

Hi Bennie,

Thanks a lot for working on this.  I have some initial review comments (and I may have some
more after further review passes).

1) Some new unit tests in TestJdbcDriver are needed for exercising this code.

2) The pattern parameters for getTables and getColumns are not being honored.  In the case
of getTables, the tableNamePattern is ignored, whereas in the case of getColumns, tableNamePattern
is assumed to be a specific table name, while columnNamePattern is ignored.  All of these
are insufficient in general, even if they are enough to get SQuirreL working.  I don't think
we should enable these API methods until we either implement them fully or make them throw
exceptions when they detect cases they aren't capable of yet.  For implementation, it's possible
in some cases to translate the input JDBC-style pattern into the form of pattern Hive expects;
in other cases, we may need to pull back more metadata than asked for and then do driver-side

3) LIkewise for the types parameter to getTables.  I've logged HIVE-1145 to get metastore
API support for this, but in the meantime we can do it via driver-side post-filtering.

4) We have comment metadata available for tables and columns, so we should return this for
the relevant REMARKS columns in the result sets.

5) Shouldn't the column names be ALL_CAPS (e.g. "TABLE_CAT" rather than "table_cat")?

6) The JDBC spec requires the result sets to be returned in a definite order (specified in
the JDBC API Javadoc for each method).  We'll need a driver-side sort to accomplish this in
some cases (e.g. for getTables, the rows are supposed to be ordered first by table type, and
then by name).

7) For getColumns, you've provided the ResultSetMetaData for the names/types of the returned
columns; we need this consistent for getCatalogs/getTables as well.

> Missing some Jdbc functionality like getTables getColumns and HiveResultSet.get* methods
based on column name.
> --------------------------------------------------------------------------------------------------------------
>                 Key: HIVE-1126
>                 URL: https://issues.apache.org/jira/browse/HIVE-1126
>             Project: Hadoop Hive
>          Issue Type: Improvement
>          Components: Clients
>    Affects Versions: 0.6.0
>            Reporter: Bennie Schut
>            Assignee: Bennie Schut
>            Priority: Minor
>             Fix For: 0.6.0
>         Attachments: HIVE-1126-1.patch, HIVE-1126.patch
> I've been using the hive jdbc driver more and more and was missing some functionality
which I added
> HiveDatabaseMetaData.getTables
> Using "show tables" to get the info from hive.
> HiveDatabaseMetaData.getColumns
> Using "describe tablename" to get the columns.
> This makes using something like SQuirreL a lot nicer since you have the list of tables
and just click on the content tab to see what's in the table.
> I also implemented
> HiveResultSet.getObject(String columnName) so you call most get* methods based on the
column name.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message