Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: f5d3605e62
Fetching contributors…

Cannot retrieve contributors at this time

13 lines (9 sloc) 0.4 kb
-- echo -e '1\x022\x01a\x031\x02b\x032\x01a\x021\x021.0' > /Users/tom/workspace/hadoop-book/input/hive/types/complex.txt
CREATE TABLE complex (
col1 ARRAY<INT>,
col2 MAP<STRING, INT>,
col3 STRUCT<a:STRING, b:INT, c:DOUBLE>
);
LOAD DATA LOCAL INPATH '/Users/tom/workspace/hadoop-book/input/hive/types/complex.txt'
OVERWRITE INTO TABLE complex;
SELECT col1[0], col2['b'], col3.c FROM complex;
Jump to Line
Something went wrong with that request. Please try again.