Commit 1cf35ce
committed
Route pushDownSort count through LIMIT > k validation
pushDownSort() called requestBuilder.pushDownLimit() directly, bypassing
the LIMIT > k guard in pushDownLimit(). Extract validateLimitWithinK()
helper and call it from both paths so the invariant holds when PPL or
future callers set a non-zero sort count.
Signed-off-by: Eric Wei <mengwei.eric@gmail.com>1 parent 0e02488 commit 1cf35ce
2 files changed
Lines changed: 35 additions & 7 deletions
File tree
- opensearch/src
- main/java/org/opensearch/sql/opensearch/storage/scan
- test/java/org/opensearch/sql/opensearch/storage/scan
Lines changed: 13 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
| 60 | + | |
67 | 61 | | |
68 | 62 | | |
69 | 63 | | |
| |||
90 | 84 | | |
91 | 85 | | |
92 | 86 | | |
| 87 | + | |
93 | 88 | | |
94 | 89 | | |
95 | 90 | | |
96 | 91 | | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
97 | 103 | | |
Lines changed: 22 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
183 | 205 | | |
184 | 206 | | |
185 | 207 | | |
| |||
0 commit comments