Commit c0faf7c
committed
Apply second-pass polish: return parsed numeric options, tighten key-order test
- parseIntOption / parseDoubleOption now return the parsed value so
validateOptions does not re-parse the canonicalized string solely to
check numeric bounds.
- The unknown-option-key stable-order test now matches the rendered
list literal "[k, max_distance, min_score, filter_type]" rather
than using indexOf("k"), which would match the "k" in "Unknown
option key" and reduce the assertion to a tautology.
- Adds a direct unit test pinning parseOptions("") -> empty map, so
the wholly-empty option string contract (which flows to the
"Missing required option" gate) is exercised explicitly.
No functional change for user-visible paths.
Signed-off-by: Eric Wei <mengwei.eric@gmail.com>1 parent 12c5553 commit c0faf7c
2 files changed
Lines changed: 21 additions & 14 deletions
File tree
- opensearch/src
- main/java/org/opensearch/sql/opensearch/storage
- test/java/org/opensearch/sql/opensearch/storage
Lines changed: 7 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
296 | 296 | | |
297 | 297 | | |
298 | 298 | | |
299 | | - | |
300 | | - | |
| 299 | + | |
301 | 300 | | |
302 | 301 | | |
303 | 302 | | |
304 | 303 | | |
305 | 304 | | |
306 | 305 | | |
307 | | - | |
308 | | - | |
| 306 | + | |
309 | 307 | | |
310 | 308 | | |
311 | 309 | | |
312 | 310 | | |
313 | 311 | | |
314 | 312 | | |
315 | 313 | | |
316 | | - | |
317 | | - | |
| 314 | + | |
318 | 315 | | |
319 | 316 | | |
320 | 317 | | |
321 | 318 | | |
322 | 319 | | |
323 | 320 | | |
324 | 321 | | |
325 | | - | |
| 322 | + | |
326 | 323 | | |
327 | 324 | | |
328 | 325 | | |
| 326 | + | |
329 | 327 | | |
330 | 328 | | |
331 | 329 | | |
332 | 330 | | |
333 | 331 | | |
334 | 332 | | |
335 | | - | |
| 333 | + | |
336 | 334 | | |
337 | 335 | | |
338 | 336 | | |
339 | 337 | | |
340 | 338 | | |
341 | 339 | | |
342 | 340 | | |
| 341 | + | |
343 | 342 | | |
344 | 343 | | |
345 | 344 | | |
| |||
Lines changed: 14 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
703 | 703 | | |
704 | 704 | | |
705 | 705 | | |
706 | | - | |
707 | | - | |
708 | | - | |
709 | | - | |
710 | | - | |
711 | | - | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
712 | 720 | | |
713 | 721 | | |
714 | 722 | | |
| |||
0 commit comments