PageRenderTime 23ms CodeModel.GetById 17ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

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

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