neilconway opened a new pull request, #22762:
URL: https://github.com/apache/datafusion/pull/22762

   ## Which issue does this PR close?
   
   - Closes #22743
   
   ## Rationale for this change
   
   This PR makes several related improvements/fixes to the stats code for semi- 
and anti-joins:
   
   1. Scale per-column stats using the estimated output row count, rather than 
just reusing the preserved side of the join.
   2. Compute `total_byte_size` for semi/anti-join results, based on summing 
per-column `byte_size`, instead of always emitting `Absent`. We still emit 
absent for other join types and if any of the per-column `byte_size` values are 
`Absent`
   3. Pass in the join's `NullEquality` semantics, and use those for stats: 
under `NullEqualsNothing`, null join keys will never match (so we can return 
`Exact(0)`), whereas under `NullEqualsNull` we consider nulls just like any 
other value.
   
   ## What changes are included in this PR?
   
   * Stats improvements described above
   * Some refactoring and cleanup
   * New unit tests
   * Update test expectations where needed
   
   ## Are these changes tested?
   
   Yes; new tests added.
   
   ## Are there any user-facing changes?
   
   Some queries might get different plans.
   


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