Skip to content

Commit

Permalink
Merge pull request #43 from sumashivaprasad/HIVE-2390
Browse files Browse the repository at this point in the history
HIVE-2390 - Lazy Binary Serde Union
  • Loading branch information
Amareshwari committed Sep 22, 2014
2 parents 9bf7c7d + 1acf8af commit c7c3fd1
Show file tree
Hide file tree
Showing 8 changed files with 896 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ql/src/test/queries/clientpositive/input_lazyserde.q
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,7 @@ CREATE TABLE dest1(a map<string,string>) ROW FORMAT DELIMITED FIELDS TERMINATED
INSERT OVERWRITE TABLE dest1 SELECT src_thrift.mstringstring FROM src_thrift DISTRIBUTE BY 1;
SELECT * from dest1 ORDER BY 1 ASC;

CREATE TABLE destBin(a UNIONTYPE<int, double, array<string>, struct<col1:int,col2:string>>) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe' STORED AS SEQUENCEFILE;
INSERT OVERWRITE TABLE destBin SELECT create_union( CASE WHEN key < 100 THEN 0 WHEN key < 200 THEN 1 WHEN key < 300 THEN 2 WHEN key < 400 THEN 3 ELSE 0 END, key, 2.0, array("one","two"), struct(5,"five")) FROM srcbucket2;
SELECT * from destBin ORDER BY a;
DROP TABLE destBin;
Loading

0 comments on commit c7c3fd1

Please sign in to comment.