PageRenderTime 7ms CodeModel.GetById 5ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 0ms

/tags/release-0.0.0-rc0/hive/external/ql/src/test/queries/clientpositive/mapreduce4.q

#
text | 20 lines | 15 code | 5 blank | 0 comment | 0 complexity | 39924c020fd4f7c1750b911ad55d39df MD5 | raw file
 1CREATE TABLE dest1(key INT, ten INT, one INT, value STRING) STORED AS TEXTFILE;
 2
 3EXPLAIN
 4FROM src
 5INSERT OVERWRITE TABLE dest1
 6MAP src.key, CAST(src.key / 10 AS INT), CAST(src.key % 10 AS INT), src.value
 7USING '/bin/cat' AS (tkey, ten, one, tvalue)
 8DISTRIBUTE BY tvalue, tkey
 9SORT BY ten DESC, one ASC;
10
11
12FROM src
13INSERT OVERWRITE TABLE dest1
14MAP src.key, CAST(src.key / 10 AS INT), CAST(src.key % 10 AS INT), src.value
15USING '/bin/cat' AS (tkey, ten, one, tvalue)
16DISTRIBUTE BY tvalue, tkey
17SORT BY ten DESC, one ASC;
18
19
20SELECT dest1.* FROM dest1;