Scan on hash key attribute does not return result with some comparison operators

Bug #1367980 reported by Andrii Ostapenko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MagnetoDB
Invalid
Undecided
Unassigned

Bug Description

When we perform scan operation using hash key attribute in scan filter with comparison operators other than "EQ", we do not always get proper result.
Example:
Table with 2 key attributes:
{
"table_name": "test_table",
"attribute_definitions": [
        {
        "attribute_name": "hash_attr",
        "attribute_type": "S"
        },
        {
        "attribute_name": "range_attr",
        "attribute_type": "S"
        }
],
"key_schema": [
        {
        "attribute_name": "hash_attr",
        "key_type": "HASH"
        },
        {
        "attribute_name": "range_attr",
        "key_type": "RANGE"
        }
]
}

Puting item:
{
        "item": {
                "hash_attr": {"S": "Hello"},
                "range_attr": {"S": "World"}
        }
}

Scanning:
{
"scan_filter": {
        "hash_attr": {
                "attribute_value_list": [{"S": "Hel"}] ,
                "comparison_operator": "BEGINS_WITH"
        }
}
}

Result:
{"count": 0, "items": [], "scanned_count": 0}

Changed in magnetodb:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.