fix(proto): preserve empty projection when ser/de MemoryScanExec - #24087
Merged
adriangb merged 2 commits intoAug 5, 2026
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #24087 +/- ##
==========================================
+ Coverage 80.86% 80.89% +0.03%
==========================================
Files 1101 1102 +1
Lines 375446 376107 +661
Branches 375446 376107 +661
==========================================
+ Hits 303592 304256 +664
+ Misses 53761 53743 -18
- Partials 18093 18108 +15 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
adriangb
reviewed
Aug 5, 2026
Comment on lines
+2363
to
+2369
| // Proto3 can't tell `None` from `Some(vec![])`; encode the latter | ||
| // as the `[u32::MAX]` sentinel, matching the join/filter nodes. | ||
| let proto_projection = match source_conf.projection().as_ref() { | ||
| None => Vec::new(), | ||
| Some(v) if v.is_empty() => vec![u32::MAX], | ||
| Some(v) => v.iter().map(|x| *x as u32).collect(), | ||
| }; |
Contributor
There was a problem hiding this comment.
Note this is a wire format change but it only impacts the already broken empty projection case, so it seems justified.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Rationale for this change
Empty projection is not ser/de correctly in MemoryScanExec
What changes are included in this PR?
Use same approach as
FilterExec,HashJoinExecetc for projection encode/decodeAre these changes tested?
Yes, new roundtrip test
roundtrip_memory_source_empty_projection, which fails on main.Are there any user-facing changes?
No