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] Trim key field in reading, map it to value field #4651

Merged
merged 17 commits into from
Dec 10, 2024

Conversation

leaves12138
Copy link
Contributor

@leaves12138 leaves12138 commented Dec 6, 2024

Purpose

The key-value storage (in primary-key table) are redundant.

Read key-value from storage may appear to fetch more fields than we need.
For example, the format of a row is: _KEY_a, _KEY_b, _FIELD_SEQUENCE, _ROW_KIND, a, b, c, d, e, f, g
The column "a" and "b" have double read. A optimization is:

read before:    _KEY_a, _KEY_b, _FIELD_SEQUENCE, _ROW_KIND, a, b, c, d, e, f, g

read after:        a, b, _FIELD_SEQUENCE, _ROW_KIND, c, d, e, f, g

While reading, we find the a, b from value and fill them to key.

Tests

API and Format

Documentation

@leaves12138 leaves12138 changed the title [core] Trim key field in reading, map it to value field [WIP] [core] Trim key field in reading, map it to value field Dec 6, 2024
@leaves12138 leaves12138 changed the title [WIP] [core] Trim key field in reading, map it to value field [core] Trim key field in reading, map it to value field Dec 6, 2024
@Zouxxyy
Copy link
Contributor

Zouxxyy commented Dec 6, 2024

If these fields are not used when reading, can we do not store them when writing

@leaves12138
Copy link
Contributor Author

If these fields are not used when reading, can we do not store them when writing

Correct, I am working on trimming them from writing.

@tsreaper tsreaper merged commit 3691419 into apache:master Dec 10, 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.

4 participants