fix: not-equals on missing attribute returns false instead of true#8
Merged
Merged
Conversation
be5513d to
aefcbc2
Compare
… of true When either operand of a comparison is missing (attribute doesn't exist), all operators returned false — including <> (not-equals). DynamoDB returns true for <> on missing attributes: a non-existent value is not equal to anything. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
aefcbc2 to
69c2670
Compare
Member
|
Two small edits pushed to your branch:
As you were a first time contributor the CI checks needed approval. CI is approved and running; I'm leaving benchmark-regression unapproved for now (unrelated housekeeping). Will merge once CI is green. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
<>(not-equals) comparison operator returnsfalsewhen either operand is a missing attribute. DynamoDB returnstrue— a non-existent value is not equal to any value.Version: dynoxide 0.9.8
Reproduction
Expected
PutItem succeeds.
status <> "working"is true because the item has nostatusattribute.Root cause
In
condition.rs, theComparisonevaluator returnsfalsefor all operators when either operand resolves toNone:Fix
Return
truefor<>when either operand is missing,falsefor all other operators:Regression tests cover all six comparison operators on missing attributes. Also submitted as a conformance test: nubo-db/dynamodb-conformance#1