Github user rahulforallp commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2362#discussion_r193962103
--- Diff:
store/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonReader.java ---
@@ -74,6 +74,8 @@ public boolean hasNext() throws IOException,
InterruptedException {
return false;
} else {
index++;
+ // current reader is closed
+ currentReader.close();
--- End diff --
@sujith71955 this we cant do in finally block because if we will do it in
finally it wiill close immendiately currentReader . currentReader we are using
to iterate rows. so its better to close last currentReader before getting new
currentReader.
---