Commit fcd24ee
committed
test: add failing test for CardinalityInRange gap within run container
CardinalityInRange returns wrong count when the query range falls
entirely within a gap between two run-encoded intervals in the same
container.
Reproducer: AddRange(0, 1024) + AddRange(2048, 3072), then
CardinalityInRange(1024, 2048) returns 1024 instead of 0.
Root cause: off-by-one in runContainer16.getCardinalityInRange,
the early return condition "lastIdx < firstIdx-1" should be
"lastIdx < firstIdx".1 parent 8923a74 commit fcd24ee
1 file changed
Lines changed: 26 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1155 | 1155 | | |
1156 | 1156 | | |
1157 | 1157 | | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
1158 | 1184 | | |
1159 | 1185 | | |
1160 | 1186 | | |
| |||
0 commit comments