Skip to content

chore: use into_parts for owned record batches columns in mito2#8023

Draft
lyang24 wants to merge 1 commit intoGreptimeTeam:mainfrom
lyang24:chore-mito2-use-recordbatch-into-parts
Draft

chore: use into_parts for owned record batches columns in mito2#8023
lyang24 wants to merge 1 commit intoGreptimeTeam:mainfrom
lyang24:chore-mito2-use-recordbatch-into-parts

Conversation

@lyang24
Copy link
Copy Markdown
Collaborator

@lyang24 lyang24 commented Apr 23, 2026

I hereby agree to the terms of the GreptimeDB CLA.

Refer to a related PR or issue link (optional)

What's changed and what's your intention?

avoids one extra Vec allocation

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.

Signed-off-by: lyang24 <lanqingy93@gmail.com>
@github-actions github-actions Bot added size/XS docs-not-required This change does not impact docs. labels Apr 23, 2026
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 handling of RecordBatch objects across several files, including compat.rs, parquet.rs, and flat_format.rs. The changes replace the pattern of cloning columns and accessing schemas separately with the into_parts() method, which decomposes the batch into its constituent components. This refactoring likely improves efficiency by avoiding unnecessary clones. I have no feedback to provide as there were no review comments to evaluate.

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/XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant