-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Populate a nulls fraction when NDV is known in TableScanStatsRule #15132
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
raunaqmorarka
force-pushed
the
delta-nulls
branch
3 times, most recently
from
November 22, 2022 12:02
7c953bb
to
681dd91
Compare
sopel39
reviewed
Nov 23, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm % comments
core/trino-main/src/main/java/io/trino/cost/TableScanStatsRule.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/cost/TableScanStatsRule.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/cost/TableScanStatsRule.java
Outdated
Show resolved
Hide resolved
plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/BaseTestMySqlTableStatisticsTest.java
Show resolved
Hide resolved
raunaqmorarka
force-pushed
the
delta-nulls
branch
3 times, most recently
from
November 23, 2022 14:25
681dd91
to
3866153
Compare
sopel39
approved these changes
Nov 23, 2022
raunaqmorarka
force-pushed
the
delta-nulls
branch
from
November 23, 2022 15:49
3866153
to
6a23c04
Compare
If a connector provides NDV but is missing nulls fraction statistic for a column (e.g. Delta Lake after "delta.dataSkippingNumIndexedCols" columns and MySql), populate a 10% guess value so that the CBO can still produce some estimates rather than failing to make any estimates due to lack of nulls fraction.
raunaqmorarka
force-pushed
the
delta-nulls
branch
from
November 23, 2022 17:11
6a23c04
to
c2666d7
Compare
Closed
Minor comment. It would be better to use a full term instead of using an abbreviation(acronym) like NDV. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
If a connector provides NDV but is missing nulls fraction statistic for a column
(e.g. Delta Lake after "delta.dataSkippingNumIndexedCols" columns and MySql), populate a
10% guess value so that the CBO can still produce some estimates rather than
failing to make any estimates due to lack of nulls fraction.
Release notes
( ) This is not user-visible or docs only and no release notes are required.
( ) Release notes are required, please propose a release note for me.
(x) Release notes are required, with the following suggested text: