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
{{ message }}
Repository navigation
Query: Allow providers to influence funcletization on low level #14507
Currently, our funcletization is influenced by providers in 2 ways.
Indicating that certain expression should not be evaluated on server. (mainly non-deterministic ones)
NotParameterizedAttribute to avoid parameterization of any function's parameter.
Both of above works fine till you encounter a method which is coming from other library. This disallows you from putting the attribute on parameter. And in order to determine that the function parameter should not be converted to query parameter, you need more info on parent expression tree to look at the function.
One such example is string.Compare(string s1, string s2, bool ignoreCase);
Has there been any discussion within the team of my idea to centralize all function registration into a single metadata store?
If we do that then this use case becomes easy to solve because the end user can modify all of the functions via the fluent api. That also assumes we add a way to mark a parameter as NotParameterized which wouldn't be difficult.
@pmiddleton - I had some thoughts about it. But can you elaborate more in this case, how it could be used. If user is using Fluent API for function (like they do for DbFunction) the translation path becomes much different. Further, that is user specific modification, while here we want to provide provider specific modification since provider is bringing the translation too.
Activity
pmiddleton commentedon Jan 24, 2019
@smitpatel -
Has there been any discussion within the team of my idea to centralize all function registration into a single metadata store?
If we do that then this use case becomes easy to solve because the end user can modify all of the functions via the fluent api. That also assumes we add a way to mark a parameter as
NotParameterizedwhich wouldn't be difficult.smitpatel commentedon Jan 24, 2019
@pmiddleton - I had some thoughts about it. But can you elaborate more in this case, how it could be used. If user is using Fluent API for function (like they do for DbFunction) the translation path becomes much different. Further, that is user specific modification, while here we want to provide provider specific modification since provider is bringing the translation too.
smitpatel commentedon Mar 16, 2020
Rather than putting complexity in funcletization it would be better handled in RelationalCommandCache.