Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query: Infer TypeMapping for Literals & Parameters correctly #13192

Closed
smitpatel opened this issue Sep 1, 2018 · 2 comments
Closed

Query: Infer TypeMapping for Literals & Parameters correctly #13192

smitpatel opened this issue Sep 1, 2018 · 2 comments
Assignees
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-enhancement
Milestone

Comments

@smitpatel
Copy link
Contributor

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.

@byrnedo
Copy link

byrnedo commented Oct 5, 2018

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?

@smitpatel
Copy link
Contributor Author

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.

@smitpatel smitpatel added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Jun 6, 2019
@smitpatel smitpatel modified the milestones: 3.0.0, 3.0.0-preview6 Jun 6, 2019
@ajcvickers ajcvickers modified the milestones: 3.0.0-preview6, 3.0.0 Nov 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-enhancement
Projects
None yet
Development

No branches or pull requests

3 participants