-
Notifications
You must be signed in to change notification settings - Fork 715
fix: always return single partition for ResultArray VRL #4300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThe changes involve updates to the Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant SearchService
participant RegexManager
Client->>SearchService: Request with query_fn
SearchService->>RegexManager: Check query_fn against RESULT_ARRAY
RegexManager-->>SearchService: Return match result
SearchService-->>Client: Return search results
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (4)
- src/config/src/meta/search.rs (2 hunks)
- src/service/search/cache/multi.rs (1 hunks)
- src/service/search/cluster/http.rs (2 hunks)
- src/service/search/mod.rs (4 hunks)
Files skipped from review due to trivial changes (1)
- src/service/search/cache/multi.rs
Additional context used
Path-based instructions (3)
src/service/search/cluster/http.rs (1)
Pattern
**/*.rs: You are a smart rustlang pull request reviewer.
You are going to review all the rustlang files.
Be concise, and add a brief explanation to your suggestionsMake sure the responses are not too verbose and keep the suggestions to the point i.e. actionable.
src/config/src/meta/search.rs (1)
Pattern
**/*.rs: You are a smart rustlang pull request reviewer.
You are going to review all the rustlang files.
Be concise, and add a brief explanation to your suggestionsMake sure the responses are not too verbose and keep the suggestions to the point i.e. actionable.
src/service/search/mod.rs (1)
Pattern
**/*.rs: You are a smart rustlang pull request reviewer.
You are going to review all the rustlang files.
Be concise, and add a brief explanation to your suggestionsMake sure the responses are not too verbose and keep the suggestions to the point i.e. actionable.
Additional comments not posted (6)
src/service/search/cluster/http.rs (1)
80-82: Centralize regex definition for modularity.The change to use
super::super::RESULT_ARRAYinstead of a locally defined regex promotes modularity and consistency across modules.src/config/src/meta/search.rs (2)
332-333: Enhance query capabilities withquery_fn.The addition of the
query_fnfield inSearchPartitionRequestallows for more complex search queries. The use of#[serde(default)]ensures backward compatibility.
558-559: Enhance query capabilities withquery_fn.The addition of the
query_fnfield inMultiSearchPartitionRequestallows for more complex search queries. The use of#[serde(default)]ensures backward compatibility.src/service/search/mod.rs (3)
65-67: IntroduceRESULT_ARRAYfor regex-based query processing.The definition of
RESULT_ARRAYusingLazy<Regex>enhances query processing by allowing regex-based conditions.
290-301: Improve query handling withquery_fnregex check.The addition of
query_fnand its check againstRESULT_ARRAYinsearch_partitionallows for more dynamic query handling.
734-737: Enhancesearch_partition_multiwithquery_fn.The inclusion of
query_fninsearch_partition_multienhances its capability to handle complex queries, aligning with the changes insearch_partition.
impl #4289
the search partition API request also added a new attribute
query_fn, like this:{ "sql": "SELECT histogram(_timestamp) AS xyz, _timestamp FROM default5 GROUP BY _timestamp ORDER BY _timestamp DESC LIMIT 10000", "start_time": 1724129780000000, "end_time": 1725080137000000, "query_fn": "#ResultArray#\nabc" }Summary by CodeRabbit
New Features
query_fnfor enhanced search functionality in search requests.query_fn, allowing for more complex query handling.Bug Fixes
Style