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] File index result should be able to process and/or. #3422

Merged
merged 3 commits into from
Jun 17, 2024

Conversation

leaves12138
Copy link
Contributor

@leaves12138 leaves12138 commented May 29, 2024

Purpose

FileIndexPredicate return FileIndexResult, not Boolean any more.

For example, bit map index:

SQL:

SELECT * FROM <TABLE> WHERE a1 = 1 and a2 = 2

Bitmap index for a1 returns rows 1,2,3
Bitmap index for a2 returns rows 4,5,6.
Then this file could be skipped.

SQL

SELECT * FROM <TABLE> WHERE a1=1 or a1=2 or a1=3

Bitmap index for a1=1 returns rows null
Bitmap index for a1=2 return rows 1,2,3
Bitmap index for a1=3 return rows 3,4,5
Then this file should be found, and rows should be 1,2,3,4,5 (push down not implement yet)

Generally, file index implement should handle method 'or', whatever the IndexResult is produced by the file index type itself, or other kind of file index.

Tests

API and Format

Documentation

@JingsongLi
Copy link
Contributor

Can you write an example about how to use FileIndexResult.

@leaves12138
Copy link
Contributor Author

leaves12138 commented Jun 17, 2024

Can you write an example about how to use FileIndexResult.

Added an example about bitmap in pull request description.

@JingsongLi
Copy link
Contributor

+1

@JingsongLi JingsongLi merged commit e5cdb85 into apache:master Jun 17, 2024
9 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