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

opt: mark SimplifyRange as essential #88399

Merged
merged 1 commit into from
Sep 21, 2022
Merged

Conversation

DrewKimball
Copy link
Collaborator

This commit marks the SimplifyRange normalization rule as essential during random rule-disabling tests. This is necessary because RangeExpr is expected to maintain the invariant that its input is always an AndExpr. Other rules can replace the AndExpr with a different expression over the course of normalization, at which point the RangeExpr needs to be removed. Otherwise, various code-paths that depend on the invariant may panic (for example, predicate implication).

Fixes #88352

Release note: None

This commit marks the `SimplifyRange` normalization rule as essential
during random rule-disabling tests. This is necessary because `RangeExpr`
is expected to maintain the invariant that its input is always an `AndExpr`.
Other rules can replace the `AndExpr` with a different expression over the
course of normalization, at which point the `RangeExpr` needs to be removed.
Otherwise, various code-paths that depend on the invariant may panic
(for example, predicate implication).

Fixes cockroachdb#88352

Release note: None
@DrewKimball DrewKimball requested a review from a team as a code owner September 21, 2022 20:54
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Member

@yuzefovich yuzefovich left a comment

Choose a reason for hiding this comment

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

:lgtm:

nit: add a backport label.

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

@DrewKimball
Copy link
Collaborator Author

Should I add a label for 21.2 as well?

@yuzefovich
Copy link
Member

I think backport to only 22.2 is needed since that where we introduced the rules-disabling knobs.

Copy link
Collaborator

@mgartner mgartner left a comment

Choose a reason for hiding this comment

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

Great find!

@DrewKimball
Copy link
Collaborator Author

TFTRs!

@DrewKimball
Copy link
Collaborator Author

bors r+

@craig
Copy link
Contributor

craig bot commented Sep 21, 2022

Build succeeded:

@craig craig bot merged commit c04fae2 into cockroachdb:master Sep 21, 2022
@blathers-crl
Copy link

blathers-crl bot commented Sep 21, 2022

Encountered an error creating backports. Some common things that can go wrong:

  1. The backport branch might have already existed.
  2. There was a merge conflict.
  3. The backport branch contained merge commits.

You might need to create your backport manually using the backport tool.


error creating merge commit from d6bd25c to blathers/backport-release-22.2-88399: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict []

you may need to manually resolve merge conflicts with the backport tool.

Backport to branch 22.2.x failed. See errors above.


🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan.

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.

roachtest: unoptimized-query-oracle/disable-rules=half failed
4 participants