Commit 17ae990
committed
Handle edge case where there is a GSI with the same hash key as the primary index
In the current implementation, when a `where` query is performed with a hash key and range key that would match a GSI, but the hash key overlaps with the primary index, the GSI is not selected and an expensive Scan is performed instead of the cheap Query.1 parent ae9152f commit 17ae990
File tree
2 files changed
+11
-3
lines changed- lib/dynamoid/criteria
- spec/dynamoid/criteria
2 files changed
+11
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | | - | |
44 | 42 | | |
45 | 43 | | |
46 | 44 | | |
| |||
49 | 47 | | |
50 | 48 | | |
51 | 49 | | |
52 | | - | |
| 50 | + | |
53 | 51 | | |
54 | 52 | | |
55 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
666 | 666 | | |
667 | 667 | | |
668 | 668 | | |
| 669 | + | |
669 | 670 | | |
670 | 671 | | |
671 | 672 | | |
| |||
766 | 767 | | |
767 | 768 | | |
768 | 769 | | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
769 | 779 | | |
770 | 780 | | |
771 | 781 | | |
| |||
0 commit comments