mattsu2020 commented on PR #26775: URL: https://github.com/apache/datafusion/pull/26775#issuecomment-6429439547
> > Add ListingTable::with_collected_statistics to scan selected columns and collect exact row counts, null counts, and NDVs using COUNT(DISTINCT ...) across all files. NULL is excluded from NDV. > > isn't this potentially very expensive? COUNT(DISTINCT ...) can be expensive, especially for high-cardinality columns. Since the goal is to improve join cardinality estimation, do we really need exact NDVs, or would approximate NDVs using APPROX_DISTINCT provide a better trade-off between accuracy and collection cost? I'd appreciate your thoughts on this. -- 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]
