Skip to content

TransactGetItems answers {} for an item its projection leaves empty #867

Open

Description

@LeeroyHannigan

What is wrong

When a Get member of TransactGetItems has a ProjectionExpression that names no attribute of an existing item, Amazon DynamoDB returns the response entry {"Item": {}}. ExtendDB returns {}, the entry for a missing item, so a client cannot tell an existing item from a missing one.

Measured in us-east-1 on 2026-11-05. An existing item with the projection nope, or with a.b where a is a number, gives {"Item": {}}. A missing item gives {}. The projection l[7] on an item whose list l has fewer than 8 elements gives {} on DynamoDB as well.

PartiQL ExecuteTransaction on #411 now projects its reads itself and gives the same answers as DynamoDB, so this is about the classic operation only.

Where

crates/engine/src/transact_get_items.rs, where the projected item becomes the response entry.

What to change

  1. Return {"Item": {}} for an existing item whose projection leaves no attribute, and {} for a missing item.
  2. Measure the l[7] case again before changing it. Then add tests for the three cases to the TransactGetItems wire tests, against both targets.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions