PageRenderTime 19ms CodeModel.GetById 14ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

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

#
text | 20 lines | 17 code | 3 blank | 0 comment | 0 complexity | 1edf847b40a3c8bc1a4132a34ca664b0 MD5 | raw file
 1CREATE TABLE dest1(key INT, value STRING) STORED AS TEXTFILE;
 2
 3EXPLAIN
 4FROM (
 5  FROM src_thrift
 6  SELECT TRANSFORM(src_thrift.aint + src_thrift.lint[0], src_thrift.lintstring[0])
 7         USING '/bin/cat' AS (tkey, tvalue) 
 8  CLUSTER BY tkey 
 9) tmap
10INSERT OVERWRITE TABLE dest1 SELECT tmap.tkey, tmap.tvalue;
11
12FROM (
13  FROM src_thrift
14  SELECT TRANSFORM(src_thrift.aint + src_thrift.lint[0], src_thrift.lintstring[0])
15         USING '/bin/cat' AS (tkey, tvalue) 
16  CLUSTER BY tkey 
17) tmap
18INSERT OVERWRITE TABLE dest1 SELECT tmap.tkey, tmap.tvalue;
19
20SELECT dest1.* FROM dest1;