mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-01 12:36:56 +00:00
The DynamoDB documentation for the size() function claims that it only works on paths (attribute names or references), but it actually works on constants from the query (e.g., ":val") as well. It turns out that Alternator supports this undocumented case already, but gets the error path wrong: Usually, when size() is calculated on the data, if the data has the wrong type of size() (e.g., an integer), the condition simply doesn't match. But if the value comes from the query - it should generate an error that the query is wrong - ValidationException. This patch fixes this case, and also adds tests for it that pass on both DynamoDB and Alternator (after this patch). Fixes #14592 Signed-off-by: Nadav Har'El <nyh@scylladb.com> Closes #14593