-- Licensed to the Apache Software Foundation (ASF) under one or more -- contributor license agreements. See the NOTICE file distributed with -- this work for additional information regarding copyright ownership. -- The ASF licenses this file to You under the Apache License, Version 2.0 -- (the "License") you may not use this file except in compliance with -- the License. You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. CREATE TABLE T1(key STRING, val STRING) STORED AS TEXTFILE CREATE TABLE T2(key STRING, val STRING) STORED AS TEXTFILE CREATE TABLE T3(key STRING, val STRING) STORED AS TEXTFILE LOAD DATA LOCAL INPATH 'seed_data_files/T1.txt' INTO TABLE T1 Copying file: file:/var/lib/hudson/workspace/Nightly-smoke-testing-monster/examples/hive/target/seed_data_files/T1.txt LOAD DATA LOCAL INPATH 'seed_data_files/T2.txt' INTO TABLE T2 Copying file: file:/var/lib/hudson/workspace/Nightly-smoke-testing-monster/examples/hive/target/seed_data_files/T2.txt LOAD DATA LOCAL INPATH 'seed_data_files/T3.txt' INTO TABLE T3 Copying file: file:/var/lib/hudson/workspace/Nightly-smoke-testing-monster/examples/hive/target/seed_data_files/T3.txt FROM UNIQUEJOIN PRESERVE T1 a (a.key), PRESERVE T2 b (b.key), PRESERVE T3 c (c.key) SELECT a.key, b.key, c.key 1 NULL NULL 2 2 2 3 3 NULL NULL 4 4 NULL 5 NULL NULL NULL 6 7 NULL 7 8 8 NULL 8 8 NULL 8 8 NULL 8 8 NULL FROM UNIQUEJOIN T1 a (a.key), T2 b (b.key), T3 c (c.key) SELECT a.key, b.key, c.key 2 2 2 FROM UNIQUEJOIN T1 a (a.key), T2 b (b.key-1), T3 c (c.key) SELECT a.key, b.key, c.key 2 3 2 7 8 7 7 8 7 FROM UNIQUEJOIN PRESERVE T1 a (a.key, a.val), PRESERVE T2 b (b.key, b.val), PRESERVE T3 c (c.key, c.val) SELECT a.key, a.val, b.key, b.val, c.key, c.val 1 11 NULL NULL NULL NULL 2 12 NULL NULL 2 12 NULL NULL 2 22 NULL NULL 3 13 3 13 NULL NULL NULL NULL 4 14 4 14 NULL NULL 5 15 NULL NULL NULL NULL NULL NULL 6 16 7 17 NULL NULL 7 17 8 18 8 18 NULL NULL 8 18 8 18 NULL NULL 8 28 NULL NULL NULL NULL FROM UNIQUEJOIN PRESERVE T1 a (a.key), T2 b (b.key), PRESERVE T3 c (c.key) SELECT a.key, b.key, c.key 1 NULL NULL 2 2 2 3 3 NULL NULL 4 4 NULL NULL 6 7 NULL 7 8 8 NULL 8 8 NULL 8 8 NULL 8 8 NULL FROM UNIQUEJOIN PRESERVE T1 a (a.key), T2 b(b.key) SELECT a.key, b.key 1 NULL 2 2 3 3 7 NULL 8 8 8 8 8 8 8 8