()
| 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 { |
nothing calls this directly
no test coverage detected