()
| 300 | } |
| 301 | |
| 302 | @Test |
| 303 | public void testBloomJoinUnion() throws Exception { |
| 304 | // Left input from a union |
| 305 | String query = |
| 306 | "a = load 'file:///tmp/input1' as (x:int, y:int);" + |
| 307 | "b = load 'file:///tmp/input2' as (x:int, z:int);" + |
| 308 | "c = load 'file:///tmp/input3' as (x:int, z:int);" + |
| 309 | "b = union b, c;" + |
| 310 | "d = join a by x, b by x using 'bloom';" + |
| 311 | "e = foreach d generate a::x as x, y, z;" + |
| 312 | "store e into 'file:///tmp/pigoutput';"; |
| 313 | |
| 314 | run(query, "test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-BloomJoin-3.gld"); |
| 315 | resetScope(); |
| 316 | setProperty(PigConfiguration.PIG_BLOOMJOIN_STRATEGY, "reduce"); |
| 317 | run(query, "test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-BloomJoin-3-KeyToReducer.gld"); |
| 318 | setProperty(PigConfiguration.PIG_BLOOMJOIN_STRATEGY, null); |
| 319 | |
| 320 | resetScope(); |
| 321 | // Right input from a union |
| 322 | query = |
| 323 | "a = load 'file:///tmp/input1' as (x:int, y:int);" + |
| 324 | "b = load 'file:///tmp/input2' as (x:int, z:int);" + |
| 325 | "c = load 'file:///tmp/input3' as (x:int, z:int);" + |
| 326 | "b = union b, c;" + |
| 327 | "d = join b by x, a by x using 'bloom';" + |
| 328 | "e = foreach d generate a::x as x, y, z;" + |
| 329 | "store e into 'file:///tmp/pigoutput';"; |
| 330 | |
| 331 | // Needs shared edges and PIG-3856 to be a more optimial plan |
| 332 | run(query, "test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-BloomJoin-4.gld"); |
| 333 | resetScope(); |
| 334 | setProperty(PigConfiguration.PIG_BLOOMJOIN_STRATEGY, "reduce"); |
| 335 | run(query, "test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-BloomJoin-4-KeyToReducer.gld"); |
| 336 | } |
| 337 | |
| 338 | @Test |
| 339 | public void testBloomJoinSplit() throws Exception { |
nothing calls this directly
no test coverage detected