haohuaijin opened a new issue, #23083:
URL: https://github.com/apache/datafusion/issues/23083

   ### Describe the bug
   
   `HashJoinExec.projection: Option<Vec<usize>>` (and the same field on 
`NestedLoopJoinExec`) is serialized as a bare `repeated uint32`. Proto3 cannot 
tell `None` from `Some(vec![])`, and the decoder treats empty as `None`:
   
   ```rust
   let projection = if !hashjoin.projection.is_empty() {
       Some(hashjoin.projection.iter().map(|i| *i as usize).collect())
   } else {
       None                              // Some(vec![]) folded in here
   };
   ```
   
   `Some(vec![])` means "emit zero columns"; `None` means "emit the full join 
schema". The round-trip silently changes the output schema. `FilterExec` 
already has a workaround for the same proto3 limitation — these two execs were 
missed.
   
   ### To Reproduce
   
   _No response_
   
   ### Expected behavior
   
   _No response_
   
   ### Additional context
   
   _No response_


-- 
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]

Reply via email to