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

Method test5

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

Source from the content-addressed store, hash-verified

241 }
242
243 @Test
244 public void test5() throws Exception {
245
246 File scriptFile = null;
247 try {
248 String[] script = {
249 "A = load '"+Util.encodeEscape(inputFile2.getAbsolutePath()) +"' ",
250 "using PigStorage(' ') as (a:int, b:int, c:chararray);",
251 "B = group A by a;"
252 };
253
254 scriptFile = Util.createLocalInputFile( "testFetchTest5.pig", script);
255 pigServer.registerScript(scriptFile.getAbsolutePath());
256 pigServer.setBatchOn();
257
258 LogicalPlan lp = TestPigStats.getLogicalPlan(pigServer);
259 PhysicalPlan pp = ((HExecutionEngine)
260 pigServer.getPigContext().getExecutionEngine()).compile(lp, null);
261 boolean planFetchable = FetchOptimizer.isPlanFetchable(pigServer.getPigContext(), pp);
262 assertFalse(planFetchable);
263
264 }
265 finally {
266 if (scriptFile != null) {
267 scriptFile.delete();
268 }
269 }
270 }
271
272 @Test
273 public void test6() 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