Repository navigation
Commit 5377800
Python: Cover callable and mixed Postgres search filters (#14313)
Postgres search filters must produce SQL predicates with their values
passed separately as ordered parameters. Extend the search execution
tests to cover callable filters, single-item and empty lists, and mixed
string/callable lists, including OR grouping, across all five supported
distance functions and both result-consumption paths.
The parameterized connector implementation from #14497 is preserved. The
diff against main is limited to test coverage and adds 30 cases. Related
to #14311.
Validation on Python 3.12:
- Postgres connector unit tests: 127 passed.
- Shared data/vector unit tests: 76 passed.
- Repository pre-commit checks for the Postgres connector and test file:
passed, including Ruff, formatting, Python syntax, pyupgrade, and
Bandit.
The tests inspect the SQL and ordered parameters passed to the mocked
Postgres cursor; no live database is required.
Co-authored-by: Eduard van Valkenburg <[email protected]>1 parent 2281d4d commit 5377800
1 file changed
Lines changed: 22 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
382 | 382 | | |
383 | 383 | | |
384 | 384 | | |
| 385 | + | |
385 | 386 | | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
386 | 390 | | |
387 | 391 | | |
388 | 392 | | |
389 | 393 | | |
390 | 394 | | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
391 | 411 | | |
392 | 412 | | |
393 | 413 | | |
| |||
408 | 428 | | |
409 | 429 | | |
410 | 430 | | |
411 | | - | |
| 431 | + | |
412 | 432 | | |
413 | 433 | | |
414 | 434 | | |
| |||
0 commit comments