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: Convert Entity comparison with null to comparison on key properties #6730

Merged
merged 1 commit into from
Oct 10, 2016

Conversation

smitpatel
Copy link
Contributor

@smitpatel smitpatel commented Oct 8, 2016

Issue here:
We need to filter on qsre not null. But since it is not being materialized the value comes from the valuebuffer. ValueBuffer is tricky object here. When we use a composite shaper, the value buffer has values but we don't know corresponding value of particular qsre to compare it to null. And when it is valuebuffer for particular qsre only then _values becomes null instead of null value inside value buffer.

For SqlServer, which flattens query, we use composite shaper, we can translate such filters to Sql via entity equality rewriting.

For SQLite & InMemory where we generate different queries we need to guard against, _values in value buffer being null instead of actual value.

built on top of #6706

Resolves #6636

@smitpatel smitpatel force-pushed the nullcheck6636 branch 2 times, most recently from 8208834 to ab805ab Compare October 10, 2016 21:00
@smitpatel
Copy link
Contributor Author

Updated with more nested tests.

…rties

Safe-guard ValueBuffer.get_item calls when value buffer could be null
@smitpatel smitpatel merged commit 896b4e2 into die6207 Oct 10, 2016
@smitpatel smitpatel deleted the nullcheck6636 branch October 10, 2016 21:54
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.

3 participants