ajantha-bhat commented on a change in pull request #3316: [CARBONDATA-3460]
Fixed EOFException in CarbonScanRDD
URL: https://github.com/apache/carbondata/pull/3316#discussion_r299880217
##########
File path:
core/src/main/java/org/apache/carbondata/hadoop/CarbonInputSplit.java
##########
@@ -359,7 +361,11 @@ public Segment getSegment() {
this.length = in.readLong();
this.version = ColumnarFormatVersion.valueOf(in.readShort());
this.rowCount = in.readInt();
- this.writeDeleteDelta = in.readBoolean();
+ int numberOfDeleteDeltaFiles = in.readInt();
+ deleteDeltaFiles = new String[numberOfDeleteDeltaFiles];
Review comment:
Initialize deleteDeltaFiles, only if numberOfDeleteDeltaFiles != 0. Else
Array size zero will be present and that's not a safe way of coding.
we cannot expect get method to check length of array, user may check just
for null also.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services