Files
floci/src/test
TATSUNO “Taz” Yasuhiro 3b7782e583 fix(dynamodb): measure item size and UpdateItem statements like DynamoDB (#5934)
* fix(dynamodb): measure item size and UpdateItem statements like DynamoDB

DynamoDB sizes a list or map at 3 bytes plus 1 per element, and a string
or binary set by its members alone.

An UpdateExpression is also measured as a statement. Each SET or ADD costs
19 bytes and each REMOVE or DELETE 1, on top of 3 for the update. Target
paths count once per shared prefix, 4 bytes per parent plus each key or
index digit. A SET also pays for every operand it reads: a value by its
size, a path at 1 plus 14 per element, list_append 37, if_not_exists 39,
plus 34 and minus 37. An ADD pays for its value. AttributeUpdates is
measured by the finished item only.

Closes #4339

* fix(dynamodb): refuse an unclosed call in an UpdateExpression

An UpdateExpression that ends inside a function call or a group, such as
"SET a = list_append(l, :v", reached the statement size check and failed
with a 500. DynamoDB refuses it before the table lookup with a syntax error
at <EOF>, near the raw text from the last token on. UpdateItem wraps the
message in the validation envelope and TransactWriteItems does not.
2026-10-18 20:56:48 -04:00
..