Tamar-Posen commented on issue #18850:
URL: https://github.com/apache/datafusion/issues/18850#issuecomment-3559413634

   You’re right - propagating the byte size in the simplest way (e.g., 
proportional to `num_rows`) is the most straightforward fix, though admittedly 
a naive solution. For now, it should be sufficient to prevent obviously wrong 
join-side selections.
   
   The fully correct approach would involve post-aggregation statistics, as in 
Spark’s CBO, or rely on column-level statistics, similar to DuckDB, to estimate 
both row counts and total byte size more accurately.
   
   In any case, I’ve opened a PR implementing the simplest solution first. This 
provides a working fix while leaving room for more accurate statistics 
propagation in the future.
   


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