-
Notifications
You must be signed in to change notification settings - Fork 481
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
Partitionkey add methods for comparison #1265
Partitionkey add methods for comparison #1265
Conversation
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
@@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |||
|
|||
### Added | |||
|
|||
- [#1233](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/1265) PartitionKey now supports operators ==, != for equality comparison. |
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.
- [#1233](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/1265) PartitionKey now supports operators ==, != for equality comparison. | |
- [#1233](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/1265) PartitionKey now supports operators ==, != for equality comparison (Thanks to KristianJakubik). |
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 don't need to be mentioned in release notes 😄.
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.
We really appreciate the contribution. There are other people mentioned in the changelog, but I'll leave it up to you.
Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/PartitionKeyTests.cs
Show resolved
Hide resolved
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
What are the scenarios for IComparable? |
Well I was thinking about |
I think we should remove IComparable until there is a scenario for it. Adding the ability to sort partition keys based on some internal logic seems like bad design that will likely cause issues in the future. |
Done |
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/DotNetSDKAPI.json
Outdated
Show resolved
Hide resolved
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
* Implements comparrision operators, methods * Add test for partition key comparison * changelog * Refactor Equals Method * Update SDKAPI * Refactor tests * Sort TypeTree by InvariantComparer * Remove IComparable form PartitionKey * Update DotNetSDKAPI.json
* Partitionkey add methods for comparison (#1265) * Implements comparrision operators, methods * Add test for partition key comparison * changelog * Refactor Equals Method * Update SDKAPI * Refactor tests * Sort TypeTree by InvariantComparer * Remove IComparable form PartitionKey * Update DotNetSDKAPI.json * undo * Compare case for default(PartitionKey) (#1312) * default case * changelog * tests * contract Co-authored-by: Kristián Jakubík <jakubikkristian@gmail.com>
Description
This PR adds methods and operators for basic comparison to the
PartitionKey
struct.Type of change
Closing issues
closes #1233