-
Notifications
You must be signed in to change notification settings - Fork 141
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
Add _routing to SQL includes list (#277) #1771
Add _routing to SQL includes list (#277) #1771
Conversation
Signed-off-by: Andrew Carbonetto <[email protected]>
Signed-off-by: Andrew Carbonetto <[email protected]>
Signed-off-by: acarbonetto <[email protected]>
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.
I think we need an IT to prove that filtering by _routing
works fine, for example:
select *, _id from <index> where _routing = 'a'
select *, _id from <index> where _routing = 'b'
The test should propagate the data properly into different shards and get their names using REST API.
Codecov Report
@@ Coverage Diff @@
## main #1771 +/- ##
=========================================
Coverage 97.32% 97.32%
- Complexity 4458 4459 +1
=========================================
Files 388 388
Lines 11050 11052 +2
Branches 790 791 +1
=========================================
+ Hits 10754 10756 +2
Misses 289 289
Partials 7 7
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Right now routing shard names are randomly assigned, so I cannot filter by shard name. Yet. Note: this is also why a doctest with _routing doesn't work, because the documents are assigned to random shards. |
Yes, but you can get shard names with REST API or CAT API |
Signed-off-by: acarbonetto <[email protected]>
Signed-off-by: acarbonetto <[email protected]>
integ-test/src/test/java/org/opensearch/sql/sql/IdentifierIT.java
Outdated
Show resolved
Hide resolved
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.
Thanks for the changes!
Signed-off-by: acarbonetto <[email protected]>
ede3956
…uting Signed-off-by: acarbonetto <[email protected]>
* Add _routing to SQL includes list Signed-off-by: Andrew Carbonetto <[email protected]> * Update IT index Signed-off-by: Andrew Carbonetto <[email protected]> * Update doctest Signed-off-by: acarbonetto <[email protected]> * Add WHERE clause IT tests Signed-off-by: acarbonetto <[email protected]> * Fix IT test Signed-off-by: acarbonetto <[email protected]> * Update documentation for _routing Signed-off-by: acarbonetto <[email protected]> --------- Signed-off-by: Andrew Carbonetto <[email protected]> Signed-off-by: acarbonetto <[email protected]> (cherry picked from commit 876a9c8)
* Add _routing to SQL includes list Signed-off-by: Andrew Carbonetto <[email protected]> * Update IT index Signed-off-by: Andrew Carbonetto <[email protected]> * Update doctest Signed-off-by: acarbonetto <[email protected]> * Add WHERE clause IT tests Signed-off-by: acarbonetto <[email protected]> * Fix IT test Signed-off-by: acarbonetto <[email protected]> * Update documentation for _routing Signed-off-by: acarbonetto <[email protected]> --------- Signed-off-by: Andrew Carbonetto <[email protected]> Signed-off-by: acarbonetto <[email protected]> (cherry picked from commit 876a9c8) Co-authored-by: Andrew Carbonetto <[email protected]>
* Add _routing to SQL includes list Signed-off-by: Andrew Carbonetto <[email protected]> * Update IT index Signed-off-by: Andrew Carbonetto <[email protected]> * Update doctest Signed-off-by: acarbonetto <[email protected]> * Add WHERE clause IT tests Signed-off-by: acarbonetto <[email protected]> * Fix IT test Signed-off-by: acarbonetto <[email protected]> * Update documentation for _routing Signed-off-by: acarbonetto <[email protected]> --------- Signed-off-by: Andrew Carbonetto <[email protected]> Signed-off-by: acarbonetto <[email protected]> (cherry picked from commit 876a9c8)
* Add _routing to SQL includes list Signed-off-by: Andrew Carbonetto <[email protected]> * Update IT index Signed-off-by: Andrew Carbonetto <[email protected]> * Update doctest Signed-off-by: acarbonetto <[email protected]> * Add WHERE clause IT tests Signed-off-by: acarbonetto <[email protected]> * Fix IT test Signed-off-by: acarbonetto <[email protected]> * Update documentation for _routing Signed-off-by: acarbonetto <[email protected]> --------- Signed-off-by: Andrew Carbonetto <[email protected]> Signed-off-by: acarbonetto <[email protected]> (cherry picked from commit 876a9c8) Co-authored-by: Andrew Carbonetto <[email protected]>
* Add _routing to SQL includes list Signed-off-by: Andrew Carbonetto <[email protected]> * Update IT index Signed-off-by: Andrew Carbonetto <[email protected]> * Update doctest Signed-off-by: acarbonetto <[email protected]> * Add WHERE clause IT tests Signed-off-by: acarbonetto <[email protected]> * Fix IT test Signed-off-by: acarbonetto <[email protected]> * Update documentation for _routing Signed-off-by: acarbonetto <[email protected]> --------- Signed-off-by: Andrew Carbonetto <[email protected]> Signed-off-by: acarbonetto <[email protected]> Signed-off-by: Mitchell Gale <[email protected]>
* Add _routing to SQL includes list Signed-off-by: Andrew Carbonetto <[email protected]> * Update IT index Signed-off-by: Andrew Carbonetto <[email protected]> * Update doctest Signed-off-by: acarbonetto <[email protected]> * Add WHERE clause IT tests Signed-off-by: acarbonetto <[email protected]> * Fix IT test Signed-off-by: acarbonetto <[email protected]> * Update documentation for _routing Signed-off-by: acarbonetto <[email protected]> --------- Signed-off-by: Andrew Carbonetto <[email protected]> Signed-off-by: acarbonetto <[email protected]> Signed-off-by: Mitchell Gale <[email protected]>
* Add _routing to SQL includes list Signed-off-by: Andrew Carbonetto <[email protected]> * Update IT index Signed-off-by: Andrew Carbonetto <[email protected]> * Update doctest Signed-off-by: acarbonetto <[email protected]> * Add WHERE clause IT tests Signed-off-by: acarbonetto <[email protected]> * Fix IT test Signed-off-by: acarbonetto <[email protected]> * Update documentation for _routing Signed-off-by: acarbonetto <[email protected]> --------- Signed-off-by: Andrew Carbonetto <[email protected]> Signed-off-by: acarbonetto <[email protected]> Signed-off-by: Mitchell Gale <[email protected]>
Description
Add the
_routing
reserved word as a metafield accessible as an identifier from any opensearch index.Example:
Example response:
Issues Resolved
Partially resolves: sql#1478
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.