Repository navigation
Add Math translators for Cosmos DB provider - #24463
Merged
Merged
Conversation
Contributor
|
@maumar I'm poaching this. |
Contributor
Member
Author
|
@bricelam sure, I will add |
Contributor
|
@maumar Looks like this still needs your expertise to answer some design questions. |
Member
Author
|
I will add tests after merge of #18842 |
smitpatel
reviewed
Jun 14, 2021
Contributor
|
@Marusyk - For now disable tests which are running into issue of convert node. Looking at the CosmosDb docs, seems like they only have double kind of numeric values. This would make any convert to double node in LINQ for numeric type no-op and translatable but I need to research more on this in order to update conversions. |
smitpatel
reviewed
Jun 16, 2021
smitpatel
approved these changes
Jun 17, 2021
Contributor
|
@Marusyk - 1 test is failing in SQL assertion (perhaps not getting translated now), can you also disable it and update the PR? |
Member
Author
|
@smitpatel I've fixed it. Thanks |
Contributor
|
@Marusyk - Thank you for contribution. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added Math for Cosmos:
ABS, CEILING, FLOOR, POWER, EXP, LOG10, LOG, SQRT, ACOS, ASIN, ATAN, ATN2, COS, SIN, TAN, SIGN, TRUNC, ROUND
Issue: #16143
Need your help with translation methods with converting.
Example:
here
od.Discountisfloat.Math.Tanrequiresdouble. So, the following expression will be generated:In this case the
TryRemoveImplicitConvertwill be called and returnnullhttps://github.com/Marusyk/efcore/blob/e23cdc0128851a8760bbcd57696f4001ae3b3a60/src/EFCore.Cosmos/Query/Internal/CosmosSqlTranslatingExpressionVisitor.cs#L685
Could you please suggest how to improve that?