Skip to content

[release-18.0] Add support for MultiEqual opcode for lookup vindexes. (#16975)#17038

Merged
arthurschreiber merged 3 commits intorelease-18.0from
backport-16975-to-release-18.0
Oct 24, 2024
Merged

[release-18.0] Add support for MultiEqual opcode for lookup vindexes. (#16975)#17038
arthurschreiber merged 3 commits intorelease-18.0from
backport-16975-to-release-18.0

Conversation

@vitess-bot
Copy link
Contributor

@vitess-bot vitess-bot bot commented Oct 22, 2024

Description

This is a backport of #16975

Signed-off-by: Arthur Schreiber <arthurschreiber@github.com>
@vitess-bot
Copy link
Contributor Author

vitess-bot bot commented Oct 22, 2024

Review Checklist

Hello reviewers! 👋 Please follow this checklist when reviewing this Pull Request.

General

  • Ensure that the Pull Request has a descriptive title.
  • Ensure there is a link to an issue (except for internal cleanup and flaky test fixes), new features should have an RFC that documents use cases and test cases.

Tests

  • Bug fixes should have at least one unit or end-to-end test, enhancement and new features should have a sufficient number of tests.

Documentation

  • Apply the release notes (needs details) label if users need to know about this change.
  • New features should be documented.
  • There should be some code comments as to why things are implemented the way they are.
  • There should be a comment at the top of each new or modified test to explain what the test does.

New flags

  • Is this flag really necessary?
  • Flag names must be clear and intuitive, use dashes (-), and have a clear help text.

If a workflow is added or modified:

  • Each item in Jobs should be named in order to mark it as required.
  • If the workflow needs to be marked as required, the maintainer team must be notified.

Backward compatibility

  • Protobuf changes should be wire-compatible.
  • Changes to _vt tables and RPCs need to be backward compatible.
  • RPC changes should be compatible with vitess-operator
  • If a flag is removed, then it should also be removed from vitess-operator and arewefastyet, if used there.
  • vtctl command output order should be stable and awk-able.

@github-actions github-actions bot added this to the v18.0.8 milestone Oct 22, 2024
Signed-off-by: Arthur Schreiber <arthurschreiber@github.com>
Comment on lines +801 to +820
"comment": "Disjunction of conjunctions with 4 or more disjunctions",
"query": "select id from user where (col = 'aa' AND name = 'bb') OR (col = 'cc' AND name = 'dd') OR (col = 'ee' AND name = 'ff') OR (col = 'gg' AND name = 'hh')",
"plan": {
"QueryType": "SELECT",
"Original": "select id from user where (col = 'aa' AND name = 'bb') OR (col = 'cc' AND name = 'dd') OR (col = 'ee' AND name = 'ff') OR (col = 'gg' AND name = 'hh')",
"Instructions": {
"OperatorType": "Route",
"Variant": "Scatter",
"Keyspace": {
"Name": "user",
"Sharded": true
},
"FieldQuery": "select id from `user` where 1 != 1",
"Query": "select id from `user` where col = 'aa' and `name` = 'bb' or col = 'cc' and `name` = 'dd' or col = 'ee' and `name` = 'ff' or col = 'gg' and `name` = 'hh'",
"Table": "`user`"
},
"TablesUsed": [
"user.user"
]
}
Copy link
Member

Choose a reason for hiding this comment

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

These queries generated MultiEqual opcodes on v19 and later, but don't do that on v18. I had to decide on whether to remove these tests or to update them.

I decided to update them with the plans they generate on v18.

Signed-off-by: Arthur Schreiber <arthurschreiber@github.com>
@arthurschreiber arthurschreiber force-pushed the backport-16975-to-release-18.0 branch from a963e9a to 2ad4c68 Compare October 24, 2024 11:43
@arthurschreiber
Copy link
Member

Because of the query planning differences between v18 and v19, I also had to go and update the executor test cases.

@arthurschreiber arthurschreiber merged commit c58abd9 into release-18.0 Oct 24, 2024
@arthurschreiber arthurschreiber deleted the backport-16975-to-release-18.0 branch October 24, 2024 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants