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

Method testOrder

test/org/apache/pig/test/TestLargeFile.java:122–142  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 6

toIntegerMethod · 0.95
openIteratorMethod · 0.80
getMethod · 0.65
registerQueryMethod · 0.45
hasNextMethod · 0.45
nextMethod · 0.45

Tested by

no test coverage detected