Skip to content
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

[core] Use min/max to fast skip the bsi index comparison #4631

Merged
merged 2 commits into from
Dec 4, 2024

Conversation

Tan-JiaLiang
Copy link
Contributor

Purpose

Firstly, When users turn off to collect the column stats, bsi compare would return a wrong result. Because the predicate can not out of the bsi min/max range in oneil compare.

Secondly, using min/max compare can fast return. e.g. in the GT case, if the predicate is less than the min value, we just need to return the existence bitmap.

At last, because of the v1.0 in paimon is not yet released, I didn't do the compatibility work about the bsi index.

Tests

org.apache.paimon.utils.BitSliceIndexRoaringBitmapTest

API and Format

Documentation

@@ -220,6 +309,7 @@ public boolean isNotEmpty() {
public void serialize(DataOutput out) throws IOException {
out.writeByte(VERSION_1);
out.writeLong(min);
out.writeLong(max);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add detailed format to the page: https://paimon.apache.org/docs/master/concepts/spec/fileindex/

You can add an explanation for bsi serialized.

Copy link
Contributor

@JingsongLi JingsongLi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 Thanks @Tan-JiaLiang

@JingsongLi JingsongLi merged commit 1b694d5 into apache:master Dec 4, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants