Verify that alias is not assignable to the ASSERT operator @throws Exception
()
| 164 | * @throws Exception |
| 165 | */ |
| 166 | @Test(expected=FrontendException.class) |
| 167 | public void testNegativeWithAlias() throws Exception { |
| 168 | PigServer pigServer = new PigServer(Util.getLocalTestMode()); |
| 169 | Data data = resetData(pigServer); |
| 170 | |
| 171 | data.set("foo", |
| 172 | tuple(1), |
| 173 | tuple(2), |
| 174 | tuple(3) |
| 175 | ); |
| 176 | try { |
| 177 | pigServer.registerQuery("A = LOAD 'foo' USING mock.Storage() AS (i:int);"); |
| 178 | pigServer.registerQuery("B = ASSERT A BY i > 1 , 'i should be greater than 1';"); |
| 179 | } |
| 180 | catch (FrontendException fe) { |
| 181 | Util.checkMessageInException(fe, "Syntax error, unexpected symbol at or near 'B'"); |
| 182 | throw fe; |
| 183 | } |
| 184 | } |
| 185 | |
| 186 | } |
nothing calls this directly
no test coverage detected