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] Introduce bitmap index record reader #4502

Merged
merged 1 commit into from
Nov 13, 2024

Conversation

Tan-JiaLiang
Copy link
Contributor

Purpose

Introduction of bitmap index record reader to filter data in advance with bitmap index result.

Tests

org.apache.paimon.table.AppendOnlyFileStoreTableTest#testBSIAndBitmapIndexInMemory
org.apache.paimon.table.AppendOnlyFileStoreTableTest#testBSIAndBitmapIndexInDisk
org.apache.paimon.table.PrimaryKeyFileStoreTableTest#testDeletionVectorsWithFileIndexInMeta
org.apache.paimon.table.PrimaryKeyFileStoreTableTest#testDeletionVectorsWithBitmapFileIndexInFile

API and Format

No.

Documentation

No.

new FileRecordReader(
bulkFormatMapping.getReaderFactory(),
formatReaderContext,
bulkFormatMapping.getIndexMapping(),
bulkFormatMapping.getCastMapping(),
PartitionUtils.create(bulkFormatMapping.getPartitionPair(), partition));

if (fileIndexResult instanceof BitmapIndexResult) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Here should be bug, bitmap in ApplyBitmapIndexRecordReader should be merged with ApplyDeletionVectorReader, otherwise the latter will encounter problems.

Can you create a test for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Could you be more specific for the bug?

As I understand it
The bitmap index reader would filter all the mismatched data
The DV reader would filter all the deleted data
Is there a conflict?

Can this test case be covered?
org.apache.paimon.table.PrimaryKeyFileStoreTableTest#testDeletionVectorsWithFileIndexInMeta
org.apache.paimon.table.PrimaryKeyFileStoreTableTest#testDeletionVectorsWithBitmapFileIndexInFile

Copy link
Contributor

Choose a reason for hiding this comment

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

You are right, the magic is in the returned position, it makes chain processing possible.

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

@JingsongLi JingsongLi merged commit 2b94a33 into apache:master Nov 13, 2024
12 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