Skip to content

sql: disable partial stats at extremes for enum and bool columns#126500

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
Uzair5162:disable-partial-stats-at-extremes-for-bool-and-enum-126401
Jul 2, 2024
Merged

sql: disable partial stats at extremes for enum and bool columns#126500
craig[bot] merged 1 commit intocockroachdb:masterfrom
Uzair5162:disable-partial-stats-at-extremes-for-bool-and-enum-126401

Conversation

@Uzair5162
Copy link
Copy Markdown
Contributor

Enums and bool types have arbitrary orderings, so it doesn't make sense to collect stats USING EXTREMES (scanning beyond the previous max and min) for these column types. Adds the
enable_create_stats_using_extremes_bool_enum session setting to allow creating partial stats at extremes on bool and enum columns, which is disabled by default.

Fixes: #126401

See also: #125950

Release note: None

Enums and bool types have arbitrary orderings, so it doesn't make sense
to collect stats `USING EXTREMES` (scanning beyond the previous max and
min) for these column types. Adds the
`enable_create_stats_using_extremes_bool_enum` session setting to allow
creating partial stats at extremes on bool and enum columns, which is
disabled by default.

Fixes: cockroachdb#126401

See also: cockroachdb#125950

Release note: None
@Uzair5162 Uzair5162 requested a review from DrewKimball July 1, 2024 15:48
@Uzair5162 Uzair5162 requested a review from a team as a code owner July 1, 2024 15:48
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
Collaborator

@DrewKimball DrewKimball left a comment

Choose a reason for hiding this comment

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

:lgtm: Nice!

Reviewed 8 of 8 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @Uzair5162)

@Uzair5162
Copy link
Copy Markdown
Contributor Author

bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Jul 2, 2024

@craig craig bot merged commit ab6798c into cockroachdb:master Jul 2, 2024
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.

sql/stats: disable partial stats using extremes for enum and bool type columns

3 participants