TheR1sing3un opened a new pull request, #9833: URL: https://github.com/apache/paimon/pull/9833
### Purpose Add `explain()` and opt-in `profile()` to local vector, batch vector, full-text, and hybrid search builders and multimodal queries. Users can inspect planned index coverage and raw fallback, then identify time spent in index search, filtering, refinement, fusion, and result lookup. `explain()` returns a structured, printable plan without running vector/text search. `profile()` executes once and returns the normal result together with the plan, stage timings, and counters: ```python query = docs.search(query_vector, column="embedding").limit(10) print(query.explain()) report = query.profile() neighbors = report.result print(report.route_metrics) ``` Coverage uses unions of planned row-ID ranges and reports indexed/raw overlap; it does not estimate live rows or recall. Primary-key source-file coverage is reported as unavailable. Profiles preserve route order and existing hybrid concurrency, measure actual lookup snapshots separately from planning snapshots, and keep timing/counter collection disabled for ordinary execution. Stage times are inclusive and can overlap. Profiling preserves existing snapshot semantics rather than introducing a transaction across routes and lookup. Document the APIs, result types, counter definitions, and measurement limits, including partial instrumentation of primary-key readers. ### Tests 234 passed, 3 skipped in the targeted Python 3.9 regression run, with `paimon_vindex` available: - `search_diagnostics_test.py` and `primary_key_global_index_golden_test.py`: native indexed/raw/refined single and batch searches, Java-written PK indexes, result equivalence, range overlap, concurrent route isolation and failure cleanup, asynchronous completion/cancellation, lookup snapshot changes, and disabled profiling clocks on ordinary execution. - Existing vector filter/metric/vindex, batch raw/refinement, hybrid execution/ranking, and multimodal table suites. - The skips are one optional `paimon_ftindex` test and two optional Ray tests. Full-text diagnostics are covered with a stub index reader. - Changed Python files pass repository-configured flake8; Python license headers and `git diff --check` pass. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
