-
Notifications
You must be signed in to change notification settings - Fork 517
Query: Adds support for LINQ extension method for VectorDistance #5157
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
...Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqTranslationBaselineTests.cs
Show resolved
Hide resolved
...Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqTranslationBaselineTests.cs
Show resolved
Hide resolved
Microsoft.Azure.Cosmos/src/Linq/BuiltinFunctions/OtherBuiltinSystemFunctions.cs
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.
|
||
if (methodCallExpression.Arguments[3] is ConstantExpression optionExpression && optionExpression.Value != null) | ||
{ | ||
string serializedConstant = System.Text.Json.JsonSerializer.Serialize( |
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.
/// <summary> | ||
/// Represents default value. | ||
/// </summary> | ||
None, |
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 am not sure other consumers of this class would work ok with this value. #Pending
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.
If we need, we can create a copy of this enum in CosmosLinqExtensions class/namespace.
/// <summary> | ||
/// Represents default value. | ||
/// </summary> | ||
None, |
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.
Pull Request Template
Description
This PR adds LINQ extension method for VectorDistance. There are 3 interface corresponding to the 3 different type supported for VectorDistance. Usage example:
Refer to the unit test for more examples.
Type of change
Please delete options that are not relevant.
Closing issues
To automatically close an issue: closes #IssueNumber