Hi.
Can someone clarify the use of structs as a complex data type for me ?
>From the language manual it looks like there are operations for structs:
S.x
S is a struct
returns the x field of S e.g for struct foobar {int foo, int bar} foobar.foo
returns the integer stored in the foo field of the struct.
What I can't figure out how to do is define a struct in a create table
statement. I was thinking it would be something like :
create table struct_test ( my_struct struct { column1 int, column2 double }
) row format delimited collection items terminated by ';' stored as
textfile;
But the create table statement fails.
There is also a mention on the tutorial page:
http://wiki.apache.org/hadoop/Hive/Tutorial?highlight=%28STRUCTS%29
Is this currently supported ? If so, can the DDL Language Manual be updated
to reflect ?
What I'm actually trying to do is create an array of structs if that is
possible.
Thanks in advance
-Matt