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 interface and file format. #3068

Merged
merged 21 commits into from
Mar 27, 2024

Conversation

leaves12138
Copy link
Contributor

@leaves12138 leaves12138 commented Mar 21, 2024

Related to PIP-17 (https://cwiki.apache.org/confluence/display/PAIMON/PIP-17%3A+Introduce+secondary+column+index)

index file format:

image

REDUNDANT field for compatibility of next version.

var bytes (head) = bytes length + real bytes
var bytes (body) = column bytes + column bytes + ...

@leaves12138 leaves12138 requested a review from JingsongLi March 21, 2024 07:18
@leaves12138 leaves12138 requested a review from JingsongLi March 26, 2024 08:27
@leaves12138 leaves12138 changed the title [core] File index interface and serder utils. [core] File index interface and file format. Mar 27, 2024
// writeColumnSize
dataOutputStream.writeInt(bodyInfo.size());
// writeColumnInfo, offset = headLength
for (Map.Entry<String, Pair<Integer, Integer>> entry : bodyInfo.entrySet()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

can we sort the key when write and use an algorithm (e.g. binary search) to speed up the search when read
in case of the large number of keys

Copy link
Contributor Author

@leaves12138 leaves12138 Mar 27, 2024

Choose a reason for hiding this comment

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

We must read all head columns and put them into a hashmap not an array list, so we don't need to sort.

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 f70f9d0 into apache:master Mar 27, 2024
9 checks passed
@zyl891229
Copy link
Contributor

+1

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.

3 participants