Skip to content

Query: Infer TypeMapping for Literals & Parameters correctly #13192

Description

@smitpatel

We have been talking in #4978 and various other issues (like #9582 ) to add API to specify store type facet inside query. While all they may be fine but we still need correct inference for all case if we want value converters to work correctly (since it come from actual type mapping). There wouldn't be any easy api to specify value converter to use for literal inside query.

Filing this issue to make inference accurate for all cases in 3.0 time frame. It shouldn't be impossible to decorate whole tree correctly. In case if we find cases which cannot be solved we can look into adding APIs to specify facets.

Activity

  1. self-assigned this
    on Sep 1, 2018
  2. added this to the 3.0.0 milestone on Sep 1, 2018
  3. byrnedo commented on Oct 5, 2018

    @byrnedo

    Hi, we're having trouble with x.CompareTo("123") > 0 where x is a varchar column, the sql generated is x > N'123'. This is causing big performance issue since it can't use the index. Any idea when this case would be fixed?

  4. smitpatel commented on Jun 6, 2019

    @smitpatel
    ContributorAuthor

    In new query pipeline we have made type mapping first class concept in translated SQL fragment, This gives us opportunity to assign type mapping for literals and parameters correctly at the time of translate only. Type inference is complex task and it would probably never be assumed to be done. Since we have done majority of work to support and it is working correctly, I am marking this issue as closed fixed.

  5. modified the milestones: 3.0.0, on Jun 6, 2019
  6. modified the milestones: , 3.0.0 on Nov 11, 2019
  7. added theissue type on Jun 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions