[ 
https://issues.apache.org/jira/browse/HIVE-1245?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12874187#action_12874187
 ] 

John Sichi commented on HIVE-1245:
----------------------------------

As part of this, should also test and document the existing support for 
serializing arrays and structs, and also expose the control over when to use 
JSON vs delimited for these and maps.

hive> CREATE TABLE complex(
   key string, 
   a array<string>, 
   s struct<col1 : int, col2 : int>)
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES (
"hbase.columns.mapping" = "cf:a, cf:s"
);
OK
hive> 
INSERT OVERWRITE TABLE complex 
SELECT bar, array('x', 'y', 'z'), struct(100, 200)
FROM pokes
WHERE foo=497;
...
OK
hive> 
SELECT * FROM complex;
OK
val_497 ["x","y","z"]   {"col1":100,"col2":200}

hbase(main):003:0> scan 'complex'
ROW                          COLUMN+CELL                                        
                              
val_497                     column= cf:s, timestamp=1275419258650, 
value=100\x02200                          
val_497                     column=cf:a, timestamp=1275419258650, 
value=x\x02y\x02z                         
1 row(s) in 1.0250 seconds


> allow access to values stored as non-strings in HBase
> -----------------------------------------------------
>
>                 Key: HIVE-1245
>                 URL: https://issues.apache.org/jira/browse/HIVE-1245
>             Project: Hadoop Hive
>          Issue Type: Improvement
>          Components: HBase Handler
>    Affects Versions: 0.6.0
>            Reporter: John Sichi
>            Assignee: John Sichi
>             Fix For: 0.6.0
>
>
> See  test case in
> http://mail-archives.apache.org/mod_mbox/hadoop-hive-user/201003.mbox/browser

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

Reply via email to