Skip to content

refactor(mito2): remove PrimaryKey variants#7982

Open
evenyag wants to merge 6 commits intoGreptimeTeam:mainfrom
evenyag:refactor/remove-pk-variant
Open

refactor(mito2): remove PrimaryKey variants#7982
evenyag wants to merge 6 commits intoGreptimeTeam:mainfrom
evenyag:refactor/remove-pk-variant

Conversation

@evenyag
Copy link
Copy Markdown
Contributor

@evenyag evenyag commented Apr 16, 2026

I hereby agree to the terms of the GreptimeDB CLA.

Refer to a related PR or issue link (optional)

#7732

What's changed and what's your intention?

Remove the old PrimaryKey read format variants and make the scan/read path use the flat format exclusively. This is a cleanup PR that drops ~1800 lines of dead code after the flat format became the only active path.

Summary of changes:

  • Make the scan compat path flat-only, removing PrimaryKey variants from ReadFormat, BatchReader, and related enums
  • Use FlatProjectionMapper directly instead of the ProjectionMapper wrapper that dispatched between flat and primary-key modes
  • Drop dead primary-key projection helpers from projection.rs and prune.rs
  • Remove dead compat batch enum (Batch vs FlatBatch distinction)
  • Use ReadFormat::Flat directly in the SST parquet reader and file range code, simplifying ParquetReaderBuilder, FileRangeContextBuilder, and format helpers
  • Fix resulting compiler warnings

PR Checklist

Please convert it to a draft if some of the following conditions are not met.

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.
  • This PR requires documentation updates.
  • API changes are backward compatible.
  • Schema or data changes are backward compatible.

evenyag added 6 commits April 16, 2026 14:46
Signed-off-by: evenyag <realevenyag@gmail.com>
Signed-off-by: evenyag <realevenyag@gmail.com>
Signed-off-by: evenyag <realevenyag@gmail.com>
Signed-off-by: evenyag <realevenyag@gmail.com>
Signed-off-by: evenyag <realevenyag@gmail.com>
Signed-off-by: evenyag <realevenyag@gmail.com>
@github-actions github-actions bot added size/XXL docs-not-required This change does not impact docs. labels Apr 16, 2026
@evenyag evenyag changed the title refactor: remove PrimaryKey variants refactor(mito2): remove PrimaryKey variants Apr 16, 2026
@evenyag evenyag marked this pull request as ready for review April 16, 2026 13:49
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the mito2 engine to remove legacy primary key format reading paths and projection mappers, consolidating the codebase around the flat format. Key changes include the removal of the ReadFormat enum in favor of FlatReadFormat, the replacement of ProjectionMapper with FlatProjectionMapper, and the deletion of associated compatibility layers such as CompatReader and PrimaryKeyCompatBatch. Additionally, PruneReader and RowGroupReader have been removed or simplified, and several utility functions have been transitioned to top-level functions. I have no feedback to provide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-not-required This change does not impact docs. size/XXL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant