(Tuple t)
| 1220 | |
| 1221 | |
| 1222 | static public void convertBagToSortedBag(Tuple t) { |
| 1223 | for (int i=0;i<t.size();i++) { |
| 1224 | Object obj = null; |
| 1225 | try { |
| 1226 | obj = t.get(i); |
| 1227 | } catch (ExecException e) { |
| 1228 | // shall not happen |
| 1229 | } |
| 1230 | if (obj instanceof DataBag) { |
| 1231 | DataBag bag = (DataBag)obj; |
| 1232 | Iterator<Tuple> iter = bag.iterator(); |
| 1233 | DataBag sortedBag = DefaultBagFactory.getInstance().newSortedBag(null); |
| 1234 | while (iter.hasNext()) { |
| 1235 | Tuple t2 = iter.next(); |
| 1236 | sortedBag.add(t2); |
| 1237 | convertBagToSortedBag(t2); |
| 1238 | } |
| 1239 | try { |
| 1240 | t.set(i, sortedBag); |
| 1241 | } catch (ExecException e) { |
| 1242 | // shall not happen |
| 1243 | } |
| 1244 | } |
| 1245 | } |
| 1246 | } |
| 1247 | |
| 1248 | static public void checkQueryOutputsAfterSortRecursive(Iterator<Tuple> actualResultsIt, |
| 1249 | String[] expectedResArray, String schemaString) throws IOException { |
no test coverage detected