You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Condition expressions: three shapes the service refuses or words differently (measured 2026-10-24) #501
Three condition expression shapes the hosted service refuses or words differently from ExtendDB, measured against the hosted service on 2026-10-24 with PutItem (each repeated, identical answers). ExtendDB answers are from the shared expression parser at main744ea29. None is covered by #489, which collects Query shapes. Table pk S and sk S; every request below carries ExpressionAttributeValues{":v": {"S": "x"}}.
Shapes
Request
Service
ExtendDB
ConditionExpression of attribute_not_exists(pk) followed by 300 OR #v = :v terms, names {"#v": "v"}
ValidationException: Invalid ConditionExpression: The expression contains too many operators; operator count: 599 (301 terms answer operator count: 601; each OR and each = counts as one operator, and the cap is 300)
accepted
ConditionExpressionattribute_not_exists(pk) OR #vvv... = :v with a placeholder of 256 bytes (# plus 255 v), names mapping it to v
ValidationException: ExpressionAttributeNames contains invalid key: The expression attribute map contains a key that is too long; size of key: 256 (257 bytes answers size of key: 257)
accepted
ConditionExpressionattribute_not_exists(pk) OR #v = = :v, names {"#v": "v"}
ValidationException: Invalid ConditionExpression: expected attribute path or value placeholder
Notes
The operator count the service reports is twice the number of comparisons plus one for this shape, so a cap test needs both the count and the message. The placeholder length bound was measured at 256 bytes only; the edge between 255 and 256 was not bisected, and the service documentation puts the maximum at 255. The syntax error wording applies to every expression parameter: the same parser produces Invalid FilterExpression:, Invalid UpdateExpression: and Invalid KeyConditionExpression: prefixes on the same fault, so one fix covers the prefix family.
Acceptance
A PutItem whose condition holds more than 300 operators, counted as the service counts them, is refused with the service's message and count.
A placeholder key over the service's length bound in ExpressionAttributeNames is refused with the service's message and the key's byte count.
A syntax error at a repeated operator is worded Syntax error; token: "<token>", near: "<window>" as the service words it, with the window the service shows.
Each is pinned by a test that compares the message text to the measured one.
More syntax error texts that differ, measured on Amazon DynamoDB in us-east-1 on 17 Nov 2026. Each request went out twice and got the same answer both times. The table is keyed on pk (S), and :v is {"S": "c"} where a request uses it. The ExtendDB column comes from SQLite at the head of PR #1095 (5ce57ec), which is open. All answers are ValidationException.
Invalid ProjectionExpression: Syntax error; token: "1", near: "01]", from the code: the tokenizer drops the space
The near text of DynamoDB is the token before the fault, the fault and the token after it, with the white space of the request. On UpdateItem, PutItem and DeleteItem, DynamoDB puts 1 validation error detected: ahead of each of these texts. On TransactWriteItems it does not. PR #1095 adds that prefix on these three operations to a refused list index and to the tokenizer's own syntax errors. So the $ rows already carry it there.
Activity
fix(expression): cap operators at 300, word syntax errors as the serv…
LeeroyHannigan commentedon Nov 17, 2026
More syntax error texts that differ, measured on Amazon DynamoDB in us-east-1 on 17 Nov 2026. Each request went out twice and got the same answer both times. The table is keyed on
pk(S), and:vis{"S": "c"}where a request uses it. The ExtendDB column comes from SQLite at the head of PR #1095 (5ce57ec), which is open. All answers areValidationException.SET a = :v,1 validation error detected: Invalid UpdateExpression: Syntax error; token: "<EOF>", near: ","Invalid UpdateExpression: expected attribute nameSET a = :v,Invalid UpdateExpression: Syntax error; token: "<EOF>", near: ","Invalid UpdateExpression: expected attribute nameSET a = $1 validation error detected: Invalid UpdateExpression: Syntax error; token: "$", near: "= $"1 validation error detected: Invalid UpdateExpression: Syntax error; token: "$", near: "$"a = $1 validation error detected: Invalid ConditionExpression: Syntax error; token: "$", near: "= $"1 validation error detected: Invalid ConditionExpression: Syntax error; token: "$", near: "a = $"a = $a = :v AND1 validation error detected: Invalid ConditionExpression: Syntax error; token: "<EOF>", near: "AND"Invalid ConditionExpression: unexpected end of expressionProjectionExpressionl[01 ]Invalid ProjectionExpression: Syntax error; token: "1", near: "01 ]"Invalid ProjectionExpression: Syntax error; token: "1", near: "01]", from the code: the tokenizer drops the spaceThe
neartext of DynamoDB is the token before the fault, the fault and the token after it, with the white space of the request. On UpdateItem, PutItem and DeleteItem, DynamoDB puts1 validation error detected:ahead of each of these texts. On TransactWriteItems it does not. PR #1095 adds that prefix on these three operations to a refused list index and to the tokenizer's own syntax errors. So the$rows already carry it there.