Commit c1b6d04
Calculate firstEvaluatedKey and lastEvaluatedKey correctly
The indexer queries DB one more row than a user requested. And the
indexer uses the additional row to let the user know whether there is
the next page or not.
The indexer should calculate firstEvaluatedKey and lastEvaluatedKey
without the additional row.
Before this commit, the indexer calculates evaluated keys before
removing the additional row.
After this commit, the indexer calculates evaluated keys after
removing the additional row.1 parent db40978 commit c1b6d04
2 files changed
+17
-25
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
175 | | - | |
176 | | - | |
177 | 175 | | |
178 | 176 | | |
179 | 177 | | |
180 | 178 | | |
181 | 179 | | |
182 | 180 | | |
183 | 181 | | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
| 182 | + | |
| 183 | + | |
193 | 184 | | |
194 | 185 | | |
195 | 186 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
| 8 | + | |
| 9 | + | |
13 | 10 | | |
14 | 11 | | |
15 | | - | |
| 12 | + | |
| 13 | + | |
16 | 14 | | |
17 | 15 | | |
18 | 16 | | |
19 | 17 | | |
20 | 18 | | |
21 | | - | |
| 19 | + | |
22 | 20 | | |
23 | 21 | | |
24 | | - | |
| 22 | + | |
25 | 23 | | |
26 | 24 | | |
27 | | - | |
| 25 | + | |
28 | 26 | | |
29 | | - | |
| 27 | + | |
30 | 28 | | |
31 | 29 | | |
32 | 30 | | |
| |||
44 | 42 | | |
45 | 43 | | |
46 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
47 | 48 | | |
48 | | - | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | | - | |
52 | | - | |
| 52 | + | |
| 53 | + | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| |||
0 commit comments