@Override public boolean nextKeyValue() { return carbonIterator.hasNext(); }
private List<Object[]> fetchRows() throws Exception { List<Object[]> converted = new ArrayList<>(); if (detailRawQueryResultIterator.hasNext()) { for (Object[] r : detailRawQueryResultIterator.next().getRows()) { converted.add(convertRow(r)); } } return converted; }
private boolean internalHasNext() { if (firstTime) { firstTime = false; currentIterator.initialize(); } boolean hasNext = currentIterator.hasNext(); // If iterator is finished then check for next iterator. if (!hasNext) { currentIterator.close(); // Check next iterator is available in the list. if (counter < inputIterators.size()) { // Get the next iterator from the list. currentIterator = inputIterators.get(counter++); // Initialize the new iterator currentIterator.initialize(); hasNext = internalHasNext(); } } return hasNext; }
@Override public boolean hasNext() { if (null == batch || checkBatchEnd(batch)) { if (iterator.hasNext()) { batch = iterator.next(); counter = 0; } else { return false; } } return !checkBatchEnd(batch); }
/** * Returns {@code true} if the iteration has more elements. (In other words, * returns {@code true} if {@link #next} would return an element rather than * throwing an exception.) * * @return {@code true} if the iteration has more elements */ @Override public boolean hasNext() { if (currentChunk != null && currentChunk.hasNext()) { return true; } else if (iterator != null && iterator.hasNext()) { currentChunk = iterator.next(); return hasNext(); } return false; }
private boolean internalHasNext() { if (firstTime) { firstTime = false; currentIterator.initialize(); } boolean hasNext = currentIterator.hasNext(); // If iterator is finished then check for next iterator. if (!hasNext) { currentIterator.close(); // Check next iterator is available in the list. if (counter < inputIterators.size()) { // Get the next iterator from the list. currentIterator = inputIterators.get(counter++); // Initialize the new iterator currentIterator.initialize(); hasNext = internalHasNext(); } } return hasNext; }
CarbonTablePath.getCarbonStreamIndexFileName()); int blockletRowCount = 0; while (inputIterators.hasNext()) { writer.write(null, inputIterators.next()); blockletRowCount++;