Skip to content

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

Merged
feilong-liu merged 1 commit intoprestodb:masterfrom
abhinavmuk04:milestone2p2
Jul 16, 2024
Merged

Treat Low Confidence, 0 estimations as unknown during joins#23047
feilong-liu merged 1 commit intoprestodb:masterfrom
abhinavmuk04:milestone2p2

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 changed the title Treat 0 Estimations as NaN Treat 0 Estimations from TableScan as NaN Jun 27, 2024
@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 marked this pull request as ready for review July 1, 2024 23:10
@abhinavmuk04 abhinavmuk04 requested review from a team, feilong-liu and jaystarshot as code owners July 1, 2024 23:10
@abhinavmuk04 abhinavmuk04 requested a review from presto-oss 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 requested a review from feilong-liu July 8, 2024 22:25
@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 requested a review from feilong-liu July 13, 2024 16:36
@feilong-liu feilong-liu merged commit 1c8b695 into prestodb:master Jul 16, 2024
@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