Skip to content

fix(proto): correctly serialize FilterExec empty projection#21885

Merged
Jefffrey merged 18 commits into
apache:mainfrom
Adez017:proto-fix
May 1, 2026
Merged

fix(proto): correctly serialize FilterExec empty projection#21885
Jefffrey merged 18 commits into
apache:mainfrom
Adez017:proto-fix

Conversation

@Adez017
Copy link
Copy Markdown
Contributor

@Adez017 Adez017 commented Apr 28, 2026

Which issue does this PR close?

Rationale for this change

FilterExec supports two semantically different projection states:

  • None → return all columns (full projection)
  • Some(vec![]) → return no columns (empty projection)
    However, both cases were being serialized identically as an empty vector in the proto representation. During deserialization, an empty vector was always mapped back to None, meaning an empty projection would silently become a full projection after a serde round-trip.

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

No

@github-actions github-actions Bot added the proto Related to proto crate label Apr 28, 2026
@Adez017
Copy link
Copy Markdown
Contributor Author

Adez017 commented Apr 28, 2026

@askalt , can you look into this ?

@Adez017
Copy link
Copy Markdown
Contributor Author

Adez017 commented Apr 28, 2026

Comment thread datafusion/proto/src/physical_plan/mod.rs
@askalt
Copy link
Copy Markdown
Contributor

askalt commented Apr 28, 2026

@Adez017 Thank you for the patch!

Comment thread datafusion/proto/src/physical_plan/mod.rs Outdated
Comment thread datafusion/proto/tests/cases/roundtrip_physical_plan.rs
@Adez017
Copy link
Copy Markdown
Contributor Author

Adez017 commented Apr 29, 2026

Hi @Jefffrey , i had pushed the changes as per comments , take a look now .

@Adez017 Adez017 requested a review from Jefffrey April 29, 2026 06:45
@Adez017
Copy link
Copy Markdown
Contributor Author

Adez017 commented Apr 30, 2026

@alamb @comphead any updates on this ?

@Jefffrey Jefffrey added this pull request to the merge queue May 1, 2026
@Jefffrey
Copy link
Copy Markdown
Contributor

Jefffrey commented May 1, 2026

Thanks @Adez017 & @askalt

Merged via the queue into apache:main with commit d59bc72 May 1, 2026
57 of 58 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

proto Related to proto crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FilterExec empty projection is changed to full projection after serde

3 participants