adriangb commented on code in PR #24087:
URL: https://github.com/apache/datafusion/pull/24087#discussion_r3723195751
##########
datafusion/proto/src/physical_plan/mod.rs:
##########
@@ -2364,12 +2360,13 @@ pub trait PhysicalPlanNodeExt: Sized {
let proto_schema: protobuf::Schema =
source_conf.original_schema().as_ref().try_into()?;
- let proto_projection = source_conf
- .projection()
- .as_ref()
- .map_or_else(Vec::new, |v| {
- v.iter().map(|x| *x as u32).collect::<Vec<u32>>()
- });
+ // 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(),
+ };
Review Comment:
Note this is a wire format change but it only impacts the already broken
empty projection case, so it seems justified.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]