prestodb / presto

The official home of the Presto distributed SQL query engine for big data
http://prestodb.io
Apache License 2.0
15.75k stars 5.28k forks source link

Treat Low Confidence, 0 estimations as unknown during joins #23047

Open abhinavmuk04 opened 1 week ago

abhinavmuk04 commented 1 week ago

Description

Treat Low Confidence, 0 estimations as unknown during joins

Motivation and Context

When a node has a low confidence and a 0 estimation it is likely due to the fact that there has been multiple filters pushed down on it. Additionally, sometimes this estimation can actually be so incorrect that it can have us broadcasting the wrong side entirely leading to a failed query. This will help us avoid this.

Impact

This can result in faster query execution times and improved overall performance.

Test Plan

Create plans tests where there are example of low confidence 0 estimation statistics and ensure behavior is as expected from the change

Contributor checklist

Release Notes

== NO RELEASE NOTE ==