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

[persist] ProtoArrayData optimization - part two #29787

Merged
merged 2 commits into from
Oct 1, 2024

Conversation

bkirwi
Copy link
Contributor

@bkirwi bkirwi commented Sep 30, 2024

Motivation

Part 2 of #29457 - now that all released versions can handle proto with type info only at the top level, write it in the more compact form.

Tips for reviewer

The upgrade tests are important here - I'll get nightlies going.

Checklist

  • This PR has adequate test coverage / QA involvement has been duly considered. (trigger-ci for additional test/nightly runs)
  • This PR has an associated up-to-date design doc, is a design doc (template), or is sufficiently small to not require a design.
  • If this PR evolves an existing $T ⇔ Proto$T mapping (possibly in a backwards-incompatible way), then it is tagged with a T-proto label.
  • If this PR will require changes to cloud orchestration or tests, there is a companion cloud PR to account for those changes that is tagged with the release-blocker label (example).
  • If this PR includes major user-facing behavior changes, I have pinged the relevant PM to schedule a changelog post.

@bkirwi bkirwi marked this pull request as ready for review September 30, 2024 19:57
@bkirwi bkirwi requested a review from a team as a code owner September 30, 2024 19:57
@danhhz
Copy link
Contributor

danhhz commented Sep 30, 2024

@ParkMyCar Wanna take the review on this one?

Copy link
Member

@ParkMyCar ParkMyCar left a comment

Choose a reason for hiding this comment

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

Glad to see .to_proto_lower(...) is already called in our proptests 💯

src/persist-types/src/arrow.rs Show resolved Hide resolved
Comment on lines +638 to 645
let Some(mut child) = body.children.pop() else {
break;
};
let Some(mut field) = fields.pop() else { break };
Copy link
Member

Choose a reason for hiding this comment

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

nit: Not part of this PR so feel free to ignore, but it seems like it would be nice to at least have a soft_assert! here that child and field have the same data type

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sadly no longer possible, by design - since we only keep type info at the top level, there's no type info on child structs to check.

src/persist-types/src/arrow.rs Show resolved Hide resolved
@bkirwi
Copy link
Contributor Author

bkirwi commented Oct 1, 2024

Nightly subset was fine - will get this merged in!

@bkirwi bkirwi merged commit 84cece5 into MaterializeInc:main Oct 1, 2024
78 checks passed
@bkirwi bkirwi deleted the trim-arraydata-2 branch October 1, 2024 19:05
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