MCPcopy Create free account
hub / github.com/apache/pig / testBloomJoinSplit

Method testBloomJoinSplit

test/org/apache/pig/tez/TestTezCompiler.java:338–372  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

336 }
337
338 @Test
339 public void testBloomJoinSplit() throws Exception {
340 // Left input from a split
341 String query =
342 "a = load 'file:///tmp/input1' as (x:int, y:int);" +
343 "b = load 'file:///tmp/input2' as (x:int, z:int);" +
344 "a1 = filter a by x == 3;" +
345 "a2 = filter a by x == 4;" +
346 "d = join a1 by x, a2 by x, b by x using 'bloom';" +
347 "e = foreach d generate a1::x as x, a1::y as y1, a2::y as y2, z;" +
348 "store e into 'file:///tmp/pigoutput';";
349
350 run(query, "test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-BloomJoin-5.gld");
351 resetScope();
352 setProperty(PigConfiguration.PIG_BLOOMJOIN_STRATEGY, "reduce");
353 run(query, "test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-BloomJoin-5-KeyToReducer.gld");
354 setProperty(PigConfiguration.PIG_BLOOMJOIN_STRATEGY, null);
355
356 resetScope();
357 // Right input from a split
358 query =
359 "a = load 'file:///tmp/input1' as (x:int, y:int);" +
360 "b = load 'file:///tmp/input2' as (x:int, z:int);" +
361 "a1 = filter a by x == 3;" +
362 "a2 = filter a by x == 4;" +
363 "d = join b by x, a1 by x using 'bloom';" +
364 "e = foreach d generate a1::x as x, y, z;" +
365 "store a2 into 'file:///tmp/pigoutput/a2';" +
366 "store e into 'file:///tmp/pigoutput/e';";
367
368 run(query, "test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-BloomJoin-6.gld");
369 resetScope();
370 setProperty(PigConfiguration.PIG_BLOOMJOIN_STRATEGY, "reduce");
371 run(query, "test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-BloomJoin-6-KeyToReducer.gld");
372 }
373
374 @Test
375 public void testBloomSelfJoin() throws Exception {

Callers

nothing calls this directly

Calls 3

runMethod · 0.95
resetScopeMethod · 0.95
setPropertyMethod · 0.95

Tested by

no test coverage detected