-
Notifications
You must be signed in to change notification settings - Fork 374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ISSUE-607]Add map ids info for each PartitionLocation to enable filtering for m… #619
Conversation
fc6c340
to
bbe0210
Compare
We should add metrics about the size of the RoaringBitmap for very large partitions and post here. |
return true; | ||
} | ||
for (int i = startMapIndex; i < endMapIndex; i++) { | ||
hasMapId = hasMapId | location.getMapIdBitMap().contains(i); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete hasMapId and rewrite to
if (location.getMapIdBitMap().contains(i)) {
return true;
}
locationCount); | ||
while (!currentReader.hasNext() && fileIndex < locationCount - 1) { | ||
while (!locationHasMapIdToRead(startMapIndex, endMapIndex, currentLocation) | ||
&& fileIndex < locationCount - 1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove fileIndex < locationCount - 1 from the condition
locationCount); | ||
while (!currentReader.hasNext() && fileIndex < locationCount - 1) { | ||
while (!locationHasMapIdToRead(startMapIndex, endMapIndex, currentLocation) | ||
&& fileIndex < locationCount - 1) { | ||
fileIndex++; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (fileIndex == locationCount) {
break;
}
if (currentReader.hasNext()) { | ||
currentChunk = currentReader.next(); | ||
fileIndex++; | ||
if (((fileIndex == (locationCount - 1)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (fileIndex < locationCount) {
return currentLocation;
} else {
return null;
}
if (currentLocation == null) { | ||
return; | ||
} | ||
currentReader = createReader(currentLocation); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why delete the following logic? For normal read we don't know if currentReader has chunks.
while (!currentReader.hasNext()...)
private void moveToNextReader() throws IOException { | ||
if (currentReader != null) { | ||
currentReader.close(); | ||
private boolean locationHasMapIdToRead( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to rename to skipLocation, and return true if we are guaranteed that the location has no data to read.
…h-partitionlocation-to-enable-filtering-for-map-range-reading
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
…ap range reading
[FEATURE]Add map ids info for each PartitionLocation to enable filtering for m…
What changes were proposed in this pull request?
Why are the changes needed?
What are the items that need reviewer attention?
Related issues.
closes #607
Related pull requests.
How was this patch tested?
/cc @related-reviewer
/assign @main-reviewer