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

Cosmos: remove null semantics compensation for InExpression #31063

Closed
roji opened this issue Jun 10, 2023 · 0 comments · Fixed by #33899
Closed

Cosmos: remove null semantics compensation for InExpression #31063

roji opened this issue Jun 10, 2023 · 0 comments · Fixed by #33899
Assignees
Labels
area-cosmos area-query closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-cleanup
Milestone

Comments

@roji
Copy link
Member

roji commented Jun 10, 2023

Although Cosmos supports a form of SQL, it does not do 3-value logic as standard SQL does; for example, null = null returns true. As a result, we don't need to do null semantics compensation. But for some reason, our InExpressionValuesExpandingExpressionVisitor (which expands InExpression values parameters to constants in SQL) adds an OR item IS NULL compensation.

As a verification, given a document containing Property2: null, the following SQL query returns the document just fine:

SELECT * FROM c WHERE c.Property2 IN (null)
@ajcvickers ajcvickers added this to the MQ milestone Jun 14, 2023
@ajcvickers ajcvickers modified the milestones: MQ, 9.0.0 Jun 4, 2024
roji added a commit to roji/efcore that referenced this issue Jun 4, 2024
roji added a commit to roji/efcore that referenced this issue Jun 5, 2024
roji added a commit to roji/efcore that referenced this issue Jun 5, 2024
@ajcvickers ajcvickers added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Jun 7, 2024
@ajcvickers ajcvickers modified the milestones: 9.0.0, 9.0.0-preview6 Jun 7, 2024
@roji roji modified the milestones: 9.0.0-preview6, 9.0.0 Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-cosmos area-query closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-cleanup
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants