Skip to content

Conversation

@usamoi
Copy link
Contributor

@usamoi usamoi commented Mar 12, 2025

based on #205

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements a feature to check qualifiers and skip reranking when the “rerank_in_table” option is enabled. It includes new hook functionality for rewriting the plan state, refactoring of the operator family into an enum with updated helper functions, and modifications across the scanners, datum unboxing, pointer conversion, and algorithm modules to support the new logic.

Reviewed Changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/index/hook.rs Added rewrite_plan_state and executor_start hooks to conditionally skip rerank based on qualifiers.
src/index/scanners/mod.rs Introduced DefaultBuilder and updated search builder traits to support new scan behavior.
src/index/scanners/default.rs Updated SearchBuilder implementation for handling vector and sphere inputs.
src/datatype/memory_halfvec.rs Added UnboxDatum implementation for HalfvecInput.
src/datatype/memory_vector.rs Added UnboxDatum implementation for VectorInput.
src/index/opclass.rs Refactored Opfamily from a struct to an enum with corresponding function updates.
src/index/am/mod.rs Revised scan hooks and pointer conversion functions to align with new design.
src/index/algorithm.rs Updated operator-dependent functions (prewarm, bulkdelete, maintain, insert) accordingly.
src/index/am/am_build.rs Adjusted traverse and build functions for better integration with the new store design.
src/lib.rs Enabled the “lazy_get” feature.
src/index/projection.rs Removed deprecated trait implementations.
src/index/functions.rs Simplified prewarm function implementation to call the updated algorithm function.
crates/algorithm/src/rerank.rs Changed the fetch function parameter to mutable for better iteration behavior.
Comments suppressed due to low confidence (1)

src/index/hook.rs:41

  • [nitpick] The field name 'hack' is ambiguous and may be misleading in production code. Consider renaming it to something more descriptive, such as 'qual_context' or 'scan_state_ptr', to clarify its purpose.
scanner.hack = std::ptr::NonNull::new(node);

@usamoi usamoi force-pushed the hook branch 2 times, most recently from 48de903 to 8df84be Compare March 17, 2025 06:37
@usamoi usamoi merged commit c3d37d1 into tensorchord:main Mar 18, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant