drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aditya Kishore (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-680) INFORMATION_SCHEMA.COLUMNS does not display hbase column familes
Date Wed, 21 May 2014 22:37:38 GMT

    [ https://issues.apache.org/jira/browse/DRILL-680?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14005334#comment-14005334
] 

Aditya Kishore commented on DRILL-680:
--------------------------------------

With this patch, HBase storage engine will publish the scheme of an HBase table in the following
format.

Column 0: \{"ORDINAL_POSITION":"0": "COLUMN_NAME": "row_key", "DATA_TYPE": "VARBINARY", "IS_NULLABLE":"No"\}.

And for each column family (in the lexicographically sorted order)
Column 1: \{"ORDINAL_POSITION":"1": "COLUMN_NAME": "<cf_1_name>", "DATA_TYPE": "MAP",
"IS_NULLABLE":"No"\}.
...
Column n: \{"ORDINAL_POSITION":"<n>": "COLUMN_NAME": "<cf_n_name>", "DATA_TYPE":
"MAP", "IS_NULLABLE":"No"\}.

Example:
{noformat}
0: jdbc:drill:zk=local> SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='students';
+---------------+--------------+------------+-------------+------------------+-------------+------------+--------------------------+-------------------------+---------------+-------------------+
| TABLE_CATALOG | TABLE_SCHEMA | TABLE_NAME | COLUMN_NAME | ORDINAL_POSITION | IS_NULLABLE
| DATA_TYPE  | CHARACTER_MAXIMUM_LENGTH | NUMERIC_PRECISION_RADIX | NUMERIC_SCALE | NUMERIC_PRECISION
|
+---------------+--------------+------------+-------------+------------------+-------------+------------+--------------------------+-------------------------+---------------+-------------------+
| DRILL         | hbase        | students   | row_key     | 0                | NO        
 | VARBINARY  | -1                       | -1                      | -2147483648   | -1  
             |
| DRILL         | hbase        | students   | cf1         | 1                | NO        
 | MAP        | -1                       | -1                      | -1            | -1  
             |
| DRILL         | hbase        | students   | cf2         | 2                | NO        
 | MAP        | -1                       | -1                      | -1            | -1  
             |
| DRILL         | hbase        | students   | cf3         | 3                | NO        
 | MAP        | -1                       | -1                      | -1            | -1  
             |
+---------------+--------------+------------+-------------+------------------+-------------+------------+--------------------------+-------------------------+---------------+-------------------+
4 rows selected (0.552 seconds)
{noformat}

> INFORMATION_SCHEMA.COLUMNS does not display hbase column familes
> ----------------------------------------------------------------
>
>                 Key: DRILL-680
>                 URL: https://issues.apache.org/jira/browse/DRILL-680
>             Project: Apache Drill
>          Issue Type: Bug
>            Reporter: Rahul Challapalli
>            Assignee: Aditya Kishore
>         Attachments: DRILL-680-INFORMATION_SCHEMA.COLUMNS-does-not-displa.patch
>
>
> Hbase Column families are not being shown in INFORMATION_SCHEMA.COLUMNS table 
> hbase> create 'students', 'cf1', 'cf2', 'cf3'
> drill> SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA='hbase' AND TABLE_NAME='students';
> The above query should return one row for each column family and probably one more column
for the hbase rowkey.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message