()
| 1264 | |
| 1265 | //PIG-2146 |
| 1266 | @Test |
| 1267 | public void testStorerLimit() throws Exception { |
| 1268 | // test if the POStore in the 1st mr plan |
| 1269 | // use the right StoreFunc |
| 1270 | String query = "a = load 'input1';" + |
| 1271 | "b = limit a 10;" + |
| 1272 | "store b into 'output' using " + PigStorageNoDefCtor.class.getName() + "(',');"; |
| 1273 | |
| 1274 | PhysicalPlan pp = Util.buildPp(pigServer, query); |
| 1275 | MROperPlan mrPlan = Util.buildMRPlan(pp, pc); |
| 1276 | |
| 1277 | LimitAdjuster la = new LimitAdjuster(mrPlan, pc); |
| 1278 | la.visit(); |
| 1279 | la.adjust(); |
| 1280 | |
| 1281 | MapReduceOper firstMrOper = mrPlan.getRoots().get(0); |
| 1282 | POStore store = (POStore)firstMrOper.reducePlan.getLeaves().get(0); |
| 1283 | assertEquals(store.getStoreFunc().getClass().getName(), "org.apache.pig.impl.io.InterStorage"); |
| 1284 | } |
| 1285 | |
| 1286 | // See PIG-4538 |
| 1287 | @Test |
nothing calls this directly
no test coverage detected