aokolnychyi commented on PR #58145: URL: https://github.com/apache/spark/pull/58145#issuecomment-6643354572
> Why do the pushed and the remaining predicates need to be estimated together, though? Our estimation is very naive right now. The example above is using conditions where each predicate is pruning a disjoint set of records. In practice, the situation can be trickier and predicates can overlap. The API here is to stay long term, so we have to account for future use cases too. > how would the stats visitor use the map Good question and to be clear I don't know what the correct shape / solution should be. One idea to explore is to make our estimation logic capture filter nodes on top of DataSourceV2Relation. Say we will add all inferred filters to the Filter node so that its condition will be the original condition + inferred predicates. DataSourceV2ScanRelation below Filter would capture the inferred mapping. Then our estimation can detect filters on top of v2 nodes and estimate the filter with all inferred predicates removed and with all source filters removed and take min of the two. Is that even feasible? Needs a deeper look. -- 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]
