Improve parsing DynamoDB begins_with expression

A query fails if it has a space between `begins_with` and `(`,
for example: ```begins_with (#1, :1)```

Fix #1996
This commit is contained in:
Ilya Shmygol 2019-11-21 13:02:27 +01:00
parent 2af4e7a63a
commit 6ea60012fc

View File

@ -481,7 +481,7 @@ class DynamoHandler(BaseResponse):
]
elif "begins_with" in range_key_expression:
range_comparison = "BEGINS_WITH"
range_values = [value_alias_map[range_key_expression_components[1]]]
range_values = [value_alias_map[range_key_expression_components[-1]]]
else:
range_values = [value_alias_map[range_key_expression_components[2]]]
else: