Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jul 16, 2024

Conversation

abhinavmuk04
Copy link
Contributor

@abhinavmuk04 abhinavmuk04 commented Jun 21, 2024

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. For more specific details on test plan please visit here

Contributor checklist

  • Please make sure your submission complies with our development, formatting, commit message, and attribution guidelines.
  • PR description addresses the issue accurately and concisely. If the change is non-trivial, a GitHub Issue is referenced.
  • Documented new properties (with its default value), SQL syntax, functions, or other functionality.
  • If release notes are required, they follow the release notes guidelines.
  • Adequate tests were added if applicable.
  • CI passed.

Release Notes

* Add treatment of low confidence, zero estimations as ``UNKNOWN`` during joins,
   with the ``treat-low-confidence-zero-estimation-as-unknown`` session property :pr:`23047`

@abhinavmuk04 abhinavmuk04 force-pushed the milestone2p2 branch 2 times, most recently from 2d27492 to 46c1268 Compare June 27, 2024 21:52
@abhinavmuk04 abhinavmuk04 changed the title Treat 0 Estimations as NaN Treat 0 Estimations from TableScan as NaN Jun 27, 2024
@abhinavmuk04 abhinavmuk04 force-pushed the milestone2p2 branch 2 times, most recently from 306201d to a91174e Compare June 28, 2024 21:56
@abhinavmuk04 abhinavmuk04 changed the title Treat 0 Estimations from TableScan as NaN Treat Low Confidence, 0 estimations as unknown during joins Jun 28, 2024
@abhinavmuk04 abhinavmuk04 force-pushed the milestone2p2 branch 7 times, most recently from e28cc10 to b6f5816 Compare July 1, 2024 23:08
@abhinavmuk04 abhinavmuk04 marked this pull request as ready for review July 1, 2024 23:10
Copy link
Contributor

@feilong-liu feilong-liu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also we need to have a session property to guard this feature.

@abhinavmuk04 abhinavmuk04 force-pushed the milestone2p2 branch 2 times, most recently from 3655454 to 959e198 Compare July 8, 2024 21:44
@abhinavmuk04 abhinavmuk04 force-pushed the milestone2p2 branch 2 times, most recently from 1d9c8cd to 49de2c9 Compare July 11, 2024 20:17
@steveburnett
Copy link
Contributor

I think a word ("joins") is missing from the release note entry. Suggested edit:

* Add treatment of low confidence, zero estimations as ``UNKNOWN`` during joins, with the ``treat-low-confidence-zero-estimation-as-unknown`` session property :pr:`23047`

@abhinavmuk04 abhinavmuk04 force-pushed the milestone2p2 branch 2 times, most recently from d6f901a to 5c35515 Compare July 11, 2024 21:02
@abhinavmuk04 abhinavmuk04 force-pushed the milestone2p2 branch 3 times, most recently from d60f2d5 to 3aff711 Compare July 12, 2024 18:24
@feilong-liu feilong-liu merged commit 1c8b695 into prestodb:master Jul 16, 2024
56 checks passed
@abhinavmuk04 abhinavmuk04 deleted the milestone2p2 branch July 16, 2024 17:23
@tdcmeehan tdcmeehan mentioned this pull request Aug 23, 2024
34 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants