-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[common] Introduce BitmapFileIndexMetaV2. #4956
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JingsongLi
reviewed
Jan 24, 2025
paimon-common/src/main/java/org/apache/paimon/fileindex/bitmap/BitmapFileIndex.java
Show resolved
Hide resolved
Tan-JiaLiang
reviewed
Feb 5, 2025
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.
@hang8929201 Thank you so much for your contribution! Almost looks good, just left some comments.
paimon-common/src/main/java/org/apache/paimon/fileindex/bitmap/BitmapFileIndexMetaV2.java
Outdated
Show resolved
Hide resolved
paimon-common/src/main/java/org/apache/paimon/fileindex/bitmap/BitmapFileIndexMetaV2.java
Show resolved
Hide resolved
paimon-common/src/main/java/org/apache/paimon/fileindex/bitmap/BitmapFileIndexMetaV2.java
Outdated
Show resolved
Hide resolved
paimon-common/src/main/java/org/apache/paimon/fileindex/bitmap/BitmapFileIndexMetaV2.java
Outdated
Show resolved
Hide resolved
@Tan-JiaLiang |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
When the bitmap-indexed column cardinality is high, using the first version of the bitmap index format will take a lot of time to read the entire dictionary. But in fact we don't need a full dictionary when dealing with a small number of predicates, the performance of predicate hits on the bitmap can be improved by creating a secondary index on the dictionary.
https://docs.google.com/document/d/11dJlGlSX3dwYKKrPN0DQ2XQTsx6d9wI6DTBIiiBwomM/edit?tab=t.0
performance
cardinality 1000:
![image](https://private-user-images.githubusercontent.com/43694260/406287342-13f37f74-0554-4ed3-a636-1ff4bd2f74e7.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNDM5MTEsIm5iZiI6MTczOTM0MzYxMSwicGF0aCI6Ii80MzY5NDI2MC80MDYyODczNDItMTNmMzdmNzQtMDU1NC00ZWQzLWE2MzYtMWZmNGJkMmY3NGU3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDA3MDAxMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTU1MmU0ZjRkYjhjMDZjM2I3ZWMyMDFmNWUzZTZjYWFhMTdjZGMwYTNiOTY5MmI5MjI1MzRhMjMyYTVkNjg3YzkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.uJJDp0a614I4OzKyprI9EyS8Mke06Lzq3a1ECCd3PoY)
cardinality 10000:
![image](https://private-user-images.githubusercontent.com/43694260/406287546-67190753-08df-4cae-93e6-c082f7e82199.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNDM5MTEsIm5iZiI6MTczOTM0MzYxMSwicGF0aCI6Ii80MzY5NDI2MC80MDYyODc1NDYtNjcxOTA3NTMtMDhkZi00Y2FlLTkzZTYtYzA4MmY3ZTgyMTk5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDA3MDAxMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTk5MDExZmI2OGE1YzJkYzY2MTBmOTc2OGY0NmJmZTVkMTc3MGVmNDZmZTg1MjI5OWJkMWFiNjEyOTFjOTI4ODkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.kFSrFWmOBamY7NltdJzVXDbh2QjwzwT0UwXftfEqZmM)
cardinality 30000:
![image](https://private-user-images.githubusercontent.com/43694260/406287663-622071c5-3622-45ce-b468-cc164a1a7b3f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNDM5MTEsIm5iZiI6MTczOTM0MzYxMSwicGF0aCI6Ii80MzY5NDI2MC80MDYyODc2NjMtNjIyMDcxYzUtMzYyMi00NWNlLWI0NjgtY2MxNjRhMWE3YjNmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDA3MDAxMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWE3MGViMTA5YzAwMmZkZTZhMGI5NTE2OWU2MzY3YWNmM2IxYTFmMWQ0M2E2ZjM2NzFmYjA2MTc2ZWQxOGQ4OWEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.6zO-V8cwlR0RGNcuWCHoItKwB5BUjNGbavg7W1qJhM8)
cardinality 50000:
![image](https://private-user-images.githubusercontent.com/43694260/406287913-0c5ad1e9-9a82-4f72-804d-8231d70911b0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNDM5MTEsIm5iZiI6MTczOTM0MzYxMSwicGF0aCI6Ii80MzY5NDI2MC80MDYyODc5MTMtMGM1YWQxZTktOWE4Mi00ZjcyLTgwNGQtODIzMWQ3MDkxMWIwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDA3MDAxMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTE0NTNkNmQ1YzkxZDM4MDI1ZDA5NzE5NzQxOGVlMmQ4NzZkNjBhM2E1NjljMDE1N2Y0ZmNjNjkyYTk5MTFjNGYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.OiBRsVaWZV2lV0a4Q5stPwPIID7PSa3cyaoOgA23XN4)
cardinality 80000:
![image](https://private-user-images.githubusercontent.com/43694260/406288045-c823a006-6c23-44e9-9429-3492cf36d058.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNDM5MTEsIm5iZiI6MTczOTM0MzYxMSwicGF0aCI6Ii80MzY5NDI2MC80MDYyODgwNDUtYzgyM2EwMDYtNmMyMy00NGU5LTk0MjktMzQ5MmNmMzZkMDU4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDA3MDAxMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWEyNTQ0NDlhYzhjYTYyNDhkM2I0ZGIxOTRkZGUyNmIwZjBiMjFkODMxNDZlMmExNTBjYzIxY2QzMmM3MGEzMjAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.Rh1pkjV4KwRwbuAqGlC_zaKvPCUCGfPwq-D0bmhcn68)
cardinality 100000:
![image](https://private-user-images.githubusercontent.com/43694260/406288167-af9d081e-0a62-42e1-b5ac-550d76f4b5fd.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNDM5MTEsIm5iZiI6MTczOTM0MzYxMSwicGF0aCI6Ii80MzY5NDI2MC80MDYyODgxNjctYWY5ZDA4MWUtMGE2Mi00MmUxLWI1YWMtNTUwZDc2ZjRiNWZkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDA3MDAxMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTNkYWVlZTk2YWVlMjU2MjQ0ZmJkZGNhNDE2MDgwNGM3YjdhNDZiOWY0YzcxMmEzOWNkN2QxMGUyN2QyMjNhMjYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.V3UI6OWFqfuIDkFi_D6jQwQ-vfWvWv_M01jSzS7misc)
Tests
org.apache.paimon.fileindex.bitmapindex.TestBitmapFileIndex
org.apache.paimon.spark.SparkFileIndexITCase
org.apache.paimon.benchmark.bitmap.BitmapIndexBenchmark
API and Format
Documentation
docs/content/concepts/spec/fileindex.md