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

He Yongqiang commented on HIVE-777:
-----------------------------------

I just realized that in this case 'null' is correct.
There is an example to show why:
hive> create table abc(strct struct<a:int, b:string>, value string);
OK
Time taken: 0.502 seconds
hive> load data local inpath 
'/Users/char/Documents/workspace/Hive-Clean/data/files/kv1.txt' overwrite into 
table abc; 
hive> select * from abc limit 10;                      
Output:
{"a":238,"b":null}      val_238
{"a":86,"b":null}       val_86
{"a":311,"b":null}      val_311
{"a":27,"b":null}       val_27
{"a":165,"b":null}      val_165
{"a":409,"b":null}      val_409
{"a":255,"b":null}      val_255
{"a":278,"b":null}      val_278
{"a":98,"b":null}       val_98
{"a":484,"b":null}      val_484

We need to find a way to assemble struct data,

> CREATE TABLE with STRUCT type
> -----------------------------
>
>                 Key: HIVE-777
>                 URL: https://issues.apache.org/jira/browse/HIVE-777
>             Project: Hadoop Hive
>          Issue Type: New Feature
>          Components: Query Processor
>            Reporter: Zheng Shao
>            Assignee: He Yongqiang
>         Attachments: hive-777-2009-8-21-2.patch, hive-777-2009-8-21.patch, 
> hive-777-2009-8-29.patch
>
>
> Currently we only support map/array in type definition.
> We should support STRUCT as well.
> {code}
> CREATE TABLE abc (
>   pageid INT,
>   ads STRUCT<adid:INT,location:STRING>,
>   userid INT
> );
> {code}

-- 
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