mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-22 07:42:16 +00:00
DynamoDB normalizes Number values, so different string representations of the same number (e.g., "1000" vs "1e3") should be treated as the same value in all contexts. In Alternator this is true in most cases, thanks to implicit normalization in Decimal `to_string()` function. However this is fragile - and in fact this function should be fixed due to OOM vulnerability in CQL use (#8002). This patch adds tests that should prevent regression in cases that work currently. Unfortunately not all contexts work currently - mainly the HASH keys are not normalized and backend handles them by byte representation. Added test replicate this incorrect behaviour All added tests pass with DynamoDB, with one exception: weirdly DynamoDB doesn't recognise unnormalized numbers in BatchGetItem as duplicate keys. Ref SCYLLADB-1575 Closes scylladb/scylladb#29501
19 KiB
19 KiB