PageRenderTime 21ms CodeModel.GetById 15ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 1ms

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

#
text | 25 lines | 18 code | 7 blank | 0 comment | 0 complexity | 39299c3a0f7041eace1f3f6baf515637 MD5 | raw file
 1CREATE TABLE T1(key STRING, val STRING) STORED AS TEXTFILE;
 2CREATE TABLE T2(key STRING, val STRING) STORED AS TEXTFILE;
 3CREATE TABLE T3(key STRING, val STRING) STORED AS TEXTFILE;
 4
 5LOAD DATA LOCAL INPATH '../data/files/T1.txt' INTO TABLE T1;
 6LOAD DATA LOCAL INPATH '../data/files/T2.txt' INTO TABLE T2;
 7LOAD DATA LOCAL INPATH '../data/files/T3.txt' INTO TABLE T3;
 8
 9FROM UNIQUEJOIN PRESERVE T1 a (a.key), PRESERVE T2 b (b.key), PRESERVE T3 c (c.key)
10SELECT a.key, b.key, c.key;
11
12FROM UNIQUEJOIN T1 a (a.key), T2 b (b.key), T3 c (c.key)
13SELECT a.key, b.key, c.key;
14
15FROM UNIQUEJOIN T1 a (a.key), T2 b (b.key-1), T3 c (c.key)
16SELECT a.key, b.key, c.key;
17
18FROM UNIQUEJOIN PRESERVE T1 a (a.key, a.val), PRESERVE T2 b (b.key, b.val), PRESERVE T3 c (c.key, c.val)
19SELECT a.key, a.val, b.key, b.val, c.key, c.val;
20
21FROM UNIQUEJOIN PRESERVE T1 a (a.key), T2 b (b.key), PRESERVE T3 c (c.key)
22SELECT a.key, b.key, c.key;
23
24FROM UNIQUEJOIN PRESERVE T1 a (a.key), T2 b(b.key)
25SELECT a.key, b.key;