fix: reject redundant parentheses in condition expressions by LeeroyHannigan · Pull Request #71 · ExtendDB/extenddb · GitHub
Skip to content

fix: reject redundant parentheses in condition expressions#71

Merged
pdf-amzn merged 1 commit into
mainfrom
fix/condition-redundant-parens
May 21, 2026
Merged

fix: reject redundant parentheses in condition expressions#71
pdf-amzn merged 1 commit into
mainfrom
fix/condition-redundant-parens

Conversation

@LeeroyHannigan

Copy link
Copy Markdown
Collaborator

What

Rejects redundant parentheses in condition expressions, matching DynamoDB behavior. ((a = :v)) and ((a = :v AND b = :v2)) are rejected, while (a = :v) and ((a = :v) AND (b = :v2)) are accepted.

Why

Closes #64

DynamoDB rejects condition expressions with redundant parentheses (parens that wrap a single already-parenthesized sub-expression). ExtendDB was accepting them.

Testing done

  • Verified 8 parenthesization patterns against real DynamoDB
  • Verified ExtendDB matches on all 8
  • cargo test --workspace passes
  • cargo clippy --all-targets -- -D warnings clean

Checklist

  • I have read CONTRIBUTING.md
  • All tests pass (cargo test --workspace)
  • Code is formatted (cargo fmt --check)
  • Clippy is clean (cargo clippy -- -W clippy::pedantic)
  • I have added or updated tests for new functionality
  • I have updated documentation if behavior changed
  • Breaking changes are noted below (if any)

By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache License 2.0 and I agree to the Developer Certificate of
Origin (DCO). See CONTRIBUTING.md for details.

@pdf-amzn pdf-amzn self-assigned this May 21, 2026
@pdf-amzn pdf-amzn merged commit b4e15f6 into main May 21, 2026
3 checks passed
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.

[Bug] Condition expression with redundant parentheses must be rejected.

3 participants