Skip to content

Query: Allow providers to influence funcletization on low level #14507

Closed as not planned

Description

@smitpatel

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);

Activity

  1. pmiddleton commented on Jan 24, 2019

    @pmiddleton
    Contributor

    @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 NotParameterized which wouldn't be difficult.

  2. smitpatel commented on Jan 24, 2019

    @smitpatel
    ContributorAuthor

    @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.

  3. added this to the Backlog milestone on Jan 25, 2019
  4. smitpatel commented on Mar 16, 2020

    @smitpatel
    ContributorAuthor

    Rather than putting complexity in funcletization it would be better handled in RelationalCommandCache.

  5. removed this from the Backlog milestone on Nov 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions