PageRenderTime 17ms 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/input18.q

#
text | 20 lines | 17 code | 3 blank | 0 comment | 0 complexity | 4dc1f1772a3e104ecf3b1181e8cff4ec 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, 1+2, 3+4)
 7         USING '/bin/cat'
 8  CLUSTER BY key
 9) tmap
10INSERT OVERWRITE TABLE dest1 SELECT tmap.key, regexp_replace(tmap.value,'\t','+') WHERE tmap.key < 100;
11
12FROM (
13  FROM src
14  SELECT TRANSFORM(src.key, src.value, 1+2, 3+4)
15         USING '/bin/cat'
16  CLUSTER BY key
17) tmap
18INSERT OVERWRITE TABLE dest1 SELECT tmap.key, regexp_replace(tmap.value,'\t','+') WHERE tmap.key < 100;
19
20SELECT dest1.* FROM dest1;