Skip to content

UpdateExpression evaluation diverges from DynamoDB (pre-update snapshot read, parenthesised arithmetic) #35

@hicksy

Description

@hicksy

Summary

Two UpdateExpression evaluation gaps versus real DynamoDB, surfaced by the dynamodb-conformance suite (Dynoxide 0.9.13).

  1. Pre-update snapshot read. SET a = :v, b = a should evaluate the whole expression against the item's pre-update state, so b gets the old value of a. Dynoxide returns b = "NEW" (the value just assigned in the same call); AWS returns b = "OLD".
  2. Parenthesised arithmetic. SET c = (c - :v) is rejected with ValidationException: Invalid UpdateExpression: Syntax error; Expected operand in SET, got (. AWS accepts the parentheses and applies the arithmetic (c = 7 for c=10, :v=3).

Both live in the UpdateExpression parser/evaluator. For reference, arithmetic around if_not_exists, nested list_append(if_not_exists(...)), map document-path SET, and list_append prepend ordering already match AWS.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions