()
| 120 | } |
| 121 | |
| 122 | @Test |
| 123 | public void testOrder() throws Exception { |
| 124 | System.out.println("Running testOrder..."); |
| 125 | int N = 0, Nplus1 = 0; |
| 126 | pig.registerQuery("A = load " + fileName + ";"); |
| 127 | pig.registerQuery("B = order A by $0;"); |
| 128 | |
| 129 | Iterator<Tuple> B = pig.openIterator("B"); |
| 130 | |
| 131 | if (B.hasNext()) { |
| 132 | N = DataType.toInteger(B.next().get(0)); |
| 133 | } |
| 134 | |
| 135 | while (B.hasNext()) { |
| 136 | Nplus1 = DataType.toInteger(B.next().get(0)); |
| 137 | |
| 138 | assertTrue("Expecting Nplus ["+Nplus1+"] to be greater than or equal to N ["+N+"]", Nplus1 >= N); |
| 139 | |
| 140 | N = Nplus1; |
| 141 | } |
| 142 | } |
| 143 | |
| 144 | @Test |
| 145 | public void testDistinct() throws Exception { |
nothing calls this directly
no test coverage detected