-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Preserve constants when doing CopyOnRewrite #19002
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
Conversation
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
|
Still working on test(s) which is why the draft status |
|
With this fix implemented on our repro fork https://github.com/andyedison/vitess/tree/v23-18987-repro "Inputs": [
{
"OperatorType": "Route",
"Variant": "None",
"Keyspace": {
"Name": "foobar_ks",
"Sharded": true
},
"FieldQuery": "select id, subquery_for_limit.updated_at from (select foobar.id, foobar.updated_at from foobar where 1 != 1) as subquery_for_limit where 1 != 1",
"OrderBy": "1 DESC",
"Query": "select id, subquery_for_limit.updated_at from (select foobar.id, foobar.updated_at from foobar where 0) as subquery_for_limit order by subquery_for_limit.updated_at desc limit 100"
}
] |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #19002 +/- ##
=======================================
Coverage ? 69.81%
=======================================
Files ? 1610
Lines ? 215353
Branches ? 0
=======================================
Hits ? 150338
Misses ? 65015
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
closing in favor of #19003 |
Description
This PR is to address a query plan regression we observed when migrating from v20 to v21. It preserves literals within the
simplifyPredicatesfunction so that it doesn't break routing optimizationsRelated Issue(s)
#18987
Checklist
Deployment Notes
AI Disclosure
This PR was written with the assistance of GitHub Copilot and Claude Opus 4.5 to help identify where the bug could be in the plan parsing, as well as a fix. Executed within environments able to reproduce #18987