Github user xubo245 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2942#discussion_r235897415
--- Diff:
core/src/main/java/org/apache/carbondata/core/scan/result/iterator/ChunkRowIterator.java
---
@@ -52,17 +49,11 @@ public ChunkRowIterator(CarbonIterator<RowBatch>
iterator) {
* @return {@code true} if the iteration has more elements
*/
@Override public boolean hasNext() {
- if (null != currentChunk) {
- if ((currentChunk.hasNext())) {
- return true;
- } else if (!currentChunk.hasNext()) {
- while (iterator.hasNext()) {
- currentChunk = iterator.next();
- if (currentChunk != null && currentChunk.hasNext()) {
- return true;
- }
- }
- }
+ if (currentChunk != null && currentChunk.hasNext()) {
--- End diff --
nice, can you put this in content of this PR?
---