Files
floci/src/main/java/io/github/hectorvent
TATSUNO “Taz” Yasuhiro 66ca9dc4a6 fix(dynamodb): bind every PartiQL parameter type and reject unordered operands (#3288)
* fix(dynamodb): bind every PartiQL parameter type and reject unordered operands

PartiQL parameters only bound S, N, BOOL and NULL. Every other type was
rejected with "Unsupported parameter type in parameters array", so a
statement could not compare against B, SS, NS, BS, L or M.

Keep those parameters as their wire node and pass them through unchanged.
Binding them makes the ordering operators reachable for types that have
no ordering, so <, <=, >, >= and BETWEEN now reject any operand outside
S, N and B. The message names the operator as it was written.

Takes tier2/partiql in the dynamodb-conformance suite from 70 to 113 of
186, with no regression elsewhere in the suite.

* fix(dynamodb): validate PartiQL parameters as AttributeValues before they run

A parameter was bound on the first type key it carried. A value with zero
or several type keys was accepted, and a binary that is not base64 reached
the comparison and failed with a 500.

Check every parameter the way AWS reads a request. Base64 is checked first
and fails with SerializationException. Then each value must carry exactly
one type key, down through lists and maps, or it is a ValidationException
with the AWS wording. The binary comparison in ExpressionEvaluator now
decodes through the guarded path, so a FilterExpression against a binary
that is not base64 is a 400 as well.

Checked against real DynamoDB in ap-northeast-1 on 2026-09-10.
2026-09-09 21:59:01 -04:00
..