feat(query): add VectorViewClause zero-copy path and unify validate#478
Open
egolearner wants to merge 3 commits into
Open
feat(query): add VectorViewClause zero-copy path and unify validate#478egolearner wants to merge 3 commits into
egolearner wants to merge 3 commits into
Conversation
d5f7b9d to
91bba29
Compare
91bba29 to
1e4e19e
Compare
| @@ -1724,8 +1736,10 @@ Result<DocPtrList> CollectionImpl::Query(const MultiQuery &query) const { | |||
| sq.include_doc_id_ = query.include_doc_id_; | |||
| sq.output_fields_ = query.output_fields; | |||
Collaborator
There was a problem hiding this comment.
这里是不是漏了对SearchQuery的validate?
| if (n <= 1) { | ||
| return false; | ||
| } | ||
| bool already_sorted = true; |
Collaborator
Author
There was a problem hiding this comment.
改为先调用need_sanitize_sparse判断是否需要排序
1e4e19e to
ffb9009
Compare
- Add VectorViewClause (string_view-based) as zero-copy counterpart to VectorClause; variant now holds VectorClause | VectorViewClause | FtsClause - Add QueryTarget::get_vector_view() unified accessor via std::visit, returns optional<VectorViewClause> regardless of which variant is held - Split validate_and_sanitize into QueryTarget::validate (read-only) + sanitize_sparse_vector (mutate); validate handles both VectorClause and VectorViewClause via get_vector_view() - Collection::Query passes original request directly to sqlengine when no sparse sanitization is needed; only copies when sort is required - Change build_query_info/BuildSQLInfoFromSearchQuery to take const SearchQuery& so VectorMatrixNode string_views point to caller's data - sqlengine internals use get_vector_view() instead of get_vector_view_clause()
ffb9009 to
a057644
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.