You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
COT - no direct Math function, equivalent to 1/TAN, should we recognize the pattern?
DEGREES, RADIANS - no direct Math function. we could recognize the mathematical pattern, e.g r = (Math.PI/180) * d, but it seems too complicated. Dedicated EF.Functions seems the most reasonable.
SQUARE - no direct Math function, we already translate Math.Pow. We could recognize the pattern Math.Pow(x, 2) but it would only work for constant. Probably better to create a decicated EF.Function, if anything at all.
PI - impossible to encounter this in expression tree because its const
StringToArray, StringToBoolean, StringToNull, StringToNumber, StringToObject - EF.Functions? (StringToBoolean could be mapped to Convert though)
ToString - we could do it, but there are differences between c# and cosmos output, potential can of worms
RIGHT, LEFT - maps cleanly only to VB method, no clear c# counterpart. LEFT is similar although we do translate some Substring scenarios into it
GetCurrentTimestamp - could correspond to new DateTimeOffset(DateTime.UtcNow)..ToUnixTimeMilliseconds() but that seems to complicated and not very discoverable. EF.Functions seems like a better option.
IS_DEFINED, IS_OBJECT, IS_PRIMITIVE - doesn't map directly to bcl
IS_ARRAY - could lead to discrepancies (collection in the model but array on the database)
See https://docs.microsoft.com/en-us/azure/cosmos-db/sql-query-system-functions, https://docs.microsoft.com/en-us/azure/cosmos-db/sql-query-linq-to-sql
Done:
Questionable:
x = null?