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: Assign types for SqlExpression correctly #20525

Merged
merged 1 commit into from
Apr 6, 2020
Merged

Conversation

smitpatel
Copy link
Member

Resolves #19990
When inferring type mapping, use inferred type mapping's clr type to determine resulting sqlExpression's type.

@AndriySvyryd
Copy link
Member

Also update Cosmos

@smitpatel
Copy link
Member Author

The issue of mismatch types arises when one side is generally typeof(object) (e.g. int + string where compiler gets object). Cosmos does not translate convert to object at this point, hence never runs into this kind of issue. For cosmos either type selected would be correct type.

Resolves #19990
When inferring type mapping, use inferred type mapping's clr type to determine resulting sqlExpression's type.
@smitpatel
Copy link
Member Author

Updated.

Copy link
Member

@AndriySvyryd AndriySvyryd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might as well do it now to make it easier to translate this in Cosmos later.

@smitpatel smitpatel merged commit 8f764c9 into master Apr 6, 2020
@smitpatel smitpatel deleted the smit/LongDrive branch April 6, 2020 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Query/Sqlite: incorrect sql generated for int + string concat queries
2 participants