Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
apmoore1 committed Aug 16, 2021
2 parents 2706c11 + 9d03c92 commit 04dc281
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions src/main/java/storage/ColumnSet.java
Original file line number Diff line number Diff line change
Expand Up @@ -234,14 +234,18 @@ private Map<Integer, Map<String, String>> getRle(Collection<Integer> rowIndices)
int currentIndex = 0;
int posInRleInMem = 0;
for (int index : rowIndices) {
Map<String, String> row = new LinkedHashMap<>();
while (currentIndex <= index) {
lastVal = rleInMem[posInRleInMem++];
currentIndex += rleInMem[posInRleInMem++];
try {
Map<String, String> row = new LinkedHashMap<>();
while (currentIndex <= index) {
lastVal = rleInMem[posInRleInMem++];
currentIndex += rleInMem[posInRleInMem++];
}
row = numericValueToRowMap(lastVal);
//row.put("i", Integer.toString(index));
rows.put(index, row);
} catch (Exception e){
LOG.debug("Spooled off end of corpus");
}
row = numericValueToRowMap(lastVal);
//row.put("i", Integer.toString(index));
rows.put(index, row);
}

return rows;
Expand All @@ -261,10 +265,10 @@ private Map<Integer, Map<String, String>> getNonRle(Collection<Integer> rowIndic
//int numericValue = buf.getInt(index*4);
row = numericValueToRowMap(numericValue);
//row.put("i", Integer.toString(index));
rows.put(index, row);
} catch (Exception e) {
e.printStackTrace();
LOG.debug("Spooled off end of corpus");
}
rows.put(index, row);
}

fc.close();
Expand Down

0 comments on commit 04dc281

Please sign in to comment.