neilconway opened a new issue, #22743: URL: https://github.com/apache/datafusion/issues/22743
### Describe the bug estimate_join_cardinality (datafusion/physical-plan/src/joins/utils.rs) estimates a reduced row count for semi/anti joins but returns the preserved input's column statistics unchanged. The per-column stats then describe the full input rather than the emitted subset: - null_count, distinct_count, and byte_size become inconsistent with the output num_rows (e.g. null_count > num_rows). - sum_value still reflects the full input. - Exact values are preserved even though a subset is only an estimate. - Join-key columns just copy the input null count, but null keys never match — a semi join drops them all, an anti join keeps them all. ### 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]
