if (work.getLeastNumRows() > 0) {
if (totalRows == work.getLeastNumRows()) {
return false;
}
for (int i = 0; i < work.getLeastNumRows(); i++) {
InspectableObject io = ftOp.getNextRow();
if (io == null) {
throw new CommandNeedRetryException();
}
res.add(((Text) mSerde.serialize(io.o, io.oi)).toString());
numRows++;
}
totalRows = work.getLeastNumRows();
return true;
}
if ((work.getLimit() >= 0) && ((work.getLimit() - totalRows) < rowsRet)) {
rowsRet = work.getLimit() - totalRows;
}
if (rowsRet <= 0) {
ftOp.clearFetchContext();
return false;
}
while (numRows < rowsRet) {
InspectableObject io = ftOp.getNextRow();
if (io == null) {
if (numRows == 0) {
return false;
}
totalRows += numRows;