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
Query beside a value the service cannot read leaves an invalid ConditionalOperator out of the combined message #978
When ExpressionAttributeValues holds a value the service cannot read as one type, the service reports several faults in one message. The message can name an invalid Select, an invalid ReturnConsumedCapacity, an invalid ConditionalOperator and a Limit below 1, in that order. The service reports this message ahead of the parameter mix. ExtendDB leaves ConditionalOperator out of that message.
I measured the service in us-east-1 on 2026-11-11, each request twice, with KeyConditionExpressionpk = :p and :p = {"S": "x"}. The ExtendDB column is a local SQLite server built from the #544 branch.
ValidationException: 2 validation errors detected: Value 'XOR' at 'conditionalOperator' failed to satisfy constraint: Member must satisfy enum value set: [OR, AND]; Value '0' at 'limit' failed to satisfy constraint: Member must have value greater than or equal to 1
ValidationException: 1 validation error detected: Value '0' at 'limit' failed to satisfy constraint: Member must have value greater than or equal to 1
:z = {"X": "1"}, ConditionalOperator "XOR"
ValidationException: 1 validation error detected: Value 'XOR' at 'conditionalOperator' failed to satisfy constraint: Member must satisfy enum value set: [OR, AND]
ValidationException: Can not use both expression and non-expression parameters in the same request: Non-expression parameters: {ConditionalOperator} Expression parameters: {KeyConditionExpression}
ValidationException: 4 validation errors detected: Value 'bad' at 'select' ...; Value 'bad' at 'returnConsumedCapacity' ...; Value 'XOR' at 'conditionalOperator' ...; Value '0' at 'limit' ...
ValidationException: 3 validation errors detected: Value 'bad' at 'select' ...; Value 'bad' at 'returnConsumedCapacity' ...; Value '0' at 'limit' ...
ConditionalOperator "XOR", no :z
ValidationException: Can not use both expression and non-expression parameters in the same request: Non-expression parameters: {ConditionalOperator} Expression parameters: {KeyConditionExpression}
the same
The last row shows that for a body the service can read, the parameter mix comes ahead of the ConditionalOperator value. unreadable_value_checks in crates/engine/src/query_key_values/unreadable.rs builds the combined message from Select, ReturnConsumedCapacity and Limit only.
More shapes of the combined form on Query and Scan, measured in us-east-1 on 24 Nov 2026 on a table that does not exist, each request twice with identical answers. Each request has two legacy filter conditions, a and b, and "ConditionalOperator": "XOR" written last.
Request
Service
Query, condition a is EQ with ["x"]
Value 'XOR' at 'conditionalOperator' failed to satisfy constraint: Member must satisfy enum value set: [AND, OR]
Query, condition a holds an empty AttributeValue ([{}])
1 validation error detected: Value 'XOR' at 'conditionalOperator' failed to satisfy constraint: Member must satisfy enum value set: [OR, AND]
Query, the ComparisonOperator of a is null
2 validation errors detected: Value null at 'queryFilter.a.member.comparisonOperator' failed to satisfy constraint: Member must not be null; Value 'XOR' at 'conditionalOperator' failed to satisfy constraint: Member must satisfy enum value set: [OR, AND]
Query, condition a holds {"S": 1}
SerializationException NUMBER_VALUE cannot be converted to String
Scan, condition a is EQ with ["x"]
the first row's text
Scan, condition a holds an empty AttributeValue
the second row's text
Scan, condition a holds {"S": 1}
the fourth row's answer
The clause comes alone, with the set as [AND, OR], when both conditions are a valid EQ, and also ahead of the operand count of a BETWEEN with one value (#1100's rows of 13 and 14 November). Beside an empty AttributeValue or a null ComparisonOperator in the filter, the service sends the counted form with [OR, AND]. A value of the wrong JSON type answers ahead of both. hitesh96db's review comment on #1100 lists more shapes that get the counted form, such as {"X": "1"} or {} in ExpressionAttributeValues or ExclusiveStartKey, and Limit 0 beside a faulty filter.
#1100 matches the first row. On the SQLite and PostgreSQL builds, which read members in name order, it sends the clause alone for the second and third rows as well, because serde stops at the first error. For the fourth row it sends the ConditionalOperator refusal. The MongoDB build reads members in the order written (#723), so its answers to those rows differ again.
Activity
fix(engine): take the envelope off the ConditionalOperator clause only
LeeroyHannigan commentedon Nov 25, 2026
More shapes of the combined form on Query and Scan, measured in us-east-1 on 24 Nov 2026 on a table that does not exist, each request twice with identical answers. Each request has two legacy filter conditions,
aandb, and"ConditionalOperator": "XOR"written last.aisEQwith["x"]Value 'XOR' at 'conditionalOperator' failed to satisfy constraint: Member must satisfy enum value set: [AND, OR]aholds an empty AttributeValue ([{}])1 validation error detected: Value 'XOR' at 'conditionalOperator' failed to satisfy constraint: Member must satisfy enum value set: [OR, AND]ComparisonOperatorofais null2 validation errors detected: Value null at 'queryFilter.a.member.comparisonOperator' failed to satisfy constraint: Member must not be null; Value 'XOR' at 'conditionalOperator' failed to satisfy constraint: Member must satisfy enum value set: [OR, AND]aholds{"S": 1}NUMBER_VALUE cannot be converted to StringaisEQwith["x"]aholds an empty AttributeValueaholds{"S": 1}The clause comes alone, with the set as
[AND, OR], when both conditions are a validEQ, and also ahead of the operand count of aBETWEENwith one value (#1100's rows of 13 and 14 November). Beside an empty AttributeValue or a nullComparisonOperatorin the filter, the service sends the counted form with[OR, AND]. A value of the wrong JSON type answers ahead of both. hitesh96db's review comment on #1100 lists more shapes that get the counted form, such as{"X": "1"}or{}inExpressionAttributeValuesorExclusiveStartKey, andLimit0 beside a faulty filter.#1100 matches the first row. On the SQLite and PostgreSQL builds, which read members in name order, it sends the clause alone for the second and third rows as well, because serde stops at the first error. For the fourth row it sends the ConditionalOperator refusal. The MongoDB build reads members in the order written (#723), so its answers to those rows differ again.