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

Method test4

test/org/apache/pig/test/TestFetch.java:213–241  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

211 }
212
213 @Test
214 public void test4() throws Exception {
215 File scriptFile = null;
216 try {
217 String[] script = {
218 "A = load '"+Util.encodeEscape(inputFile2.getAbsolutePath()) +"' ",
219 "using PigStorage(' ') as (a:int, b:int, c:chararray);",
220 "B = limit A 2;",
221 "C = limit A 1;",
222 "D = union A,B,C;" //introduces an implicit split operator
223 };
224
225 scriptFile = Util.createLocalInputFile( "testFetchTest4.pig", script);
226 pigServer.registerScript(scriptFile.getAbsolutePath());
227 pigServer.setBatchOn();
228
229 LogicalPlan lp = TestPigStats.getLogicalPlan(pigServer);
230 PhysicalPlan pp = ((HExecutionEngine)
231 pigServer.getPigContext().getExecutionEngine()).compile(lp, null);
232 boolean planFetchable = FetchOptimizer.isPlanFetchable(pigServer.getPigContext(), pp);
233 assertFalse(planFetchable);
234
235 }
236 finally {
237 if (scriptFile != null) {
238 scriptFile.delete();
239 }
240 }
241 }
242
243 @Test
244 public void test5() throws Exception {

Callers

nothing calls this directly

Calls 11

encodeEscapeMethod · 0.95
createLocalInputFileMethod · 0.95
getLogicalPlanMethod · 0.95
isPlanFetchableMethod · 0.95
getAbsolutePathMethod · 0.80
getExecutionEngineMethod · 0.65
deleteMethod · 0.65
registerScriptMethod · 0.45
setBatchOnMethod · 0.45
compileMethod · 0.45
getPigContextMethod · 0.45

Tested by

no test coverage detected