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

   ### Describe the bug
   
   For inner/left/right/full joins, estimate_join_cardinality concatenates both 
inputs' column statistics verbatim and never adjusts them to the estimated 
output cardinality:
   
   - Count-like fields (null_count, distinct_count, byte_size, sum_value) 
aren't scaled to the join's fan-out/selectivity, so they can be inconsistent 
with the output num_rows.
   - Outer joins don't NULL-pad the non-preserved side, even though the 
side-to-pad is already known (utils.rs:240-242).
   - Equi-join key columns aren't intersected (min/max) or NDV-bounded 
(min(left_ndv, right_ndv)).
   
   Related to #22743 but the general join case might be a bit more involved.
   
   ### 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