$beginsWith, offered only where the table stores the attribute in a form
begins_with applies to.
DynamoDB's begins_with takes a String or a Binary attribute. The stored
form decides, not the declared one, which is why a date attribute keeps it:
declared Date, stored as an ISO string, and matching a date by year prefix
is what the operator is for there. A number, a boolean, a Map or a List has
no prefix, so begins_with on one matches nothing and DynamoDB reports no
error — the condition is better removed from the type than compiled.
Each branch tests V directly so the conditional distributes. That matters
for a value whose type is a union: an unresolved dot path takes the whole
scalar union, which includes string, and stays unconstrained — the
behavior such a path has always had. Testing a mapped form of V instead
would compare the union as a whole and drop the operator from every one.
$beginsWith, offered only where the table stores the attribute in a formbegins_withapplies to.DynamoDB's
begins_withtakes a String or a Binary attribute. The stored form decides, not the declared one, which is why a date attribute keeps it: declaredDate, stored as an ISO string, and matching a date by year prefix is what the operator is for there. A number, a boolean, a Map or a List has no prefix, sobegins_withon one matches nothing and DynamoDB reports no error — the condition is better removed from the type than compiled.Each branch tests
Vdirectly so the conditional distributes. That matters for a value whose type is a union: an unresolved dot path takes the whole scalar union, which includesstring, and stays unconstrained — the behavior such a path has always had. Testing a mapped form ofVinstead would compare the union as a whole and drop the operator from every one.