Skip to content

[core] File index result should be able to process and/or.#3422

Merged
JingsongLi merged 3 commits intoapache:masterfrom
leaves12138:result
Jun 17, 2024
Merged

[core] File index result should be able to process and/or.#3422
JingsongLi merged 3 commits intoapache:masterfrom
leaves12138:result

Conversation

@leaves12138
Copy link
Copy Markdown
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
Copy Markdown
Contributor

Can you write an example about how to use FileIndexResult.

@leaves12138
Copy link
Copy Markdown
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
Copy Markdown
Contributor

+1

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