sql icon indicating copy to clipboard operation
sql copied to clipboard

Set target routing shard by partition key (#316)

Open acarbonetto opened this issue 2 years ago • 0 comments

Description

Allows user to set routing shard via the relation partition keys. For example:

select _id, _index, _routing, int0 from calcs_routing PARTITION(KEY1, KEY2) where _routing = 'KEY1' or _routing = 'KEY2'

Note that multiple keys can be send to OpenSearch storage by using comma-delimited list.

IT tests

New IT tests running against a multi-node cluster have been added to the build. These can be run using ./gradlew :integ-test:multiClusterSearch and will be automatically run against CI.

TODO

  • [ ] Rebase
  • [ ] Update IT test strategy
  • [ ] Propose PPL syntax

Issues Resolved

  • fixes https://github.com/opensearch-project/sql/issues/1478 (SQL)

Note (out of scope): PPL syntax is still TBD

Check List

  • [x] New functionality includes testing.
    • [x] All tests pass, including unit test, integration test and doctest
  • [x] New functionality has been documented.
    • [x] New functionality has javadoc added
    • [x] New functionality has user manual doc added
  • [x] Commits are signed per the DCO using --signoff

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.

acarbonetto avatar Aug 23 '23 20:08 acarbonetto