Closed waynexia closed 3 months ago
[!NOTE]
Reviews paused
Use the following commands to manage reviews:
@coderabbitai resume
to resume automatic reviews.@coderabbitai review
to trigger a single review.
The recent updates introduce a MatchesFunction
for full-text search functionality in the matches.rs
file. This includes parsing search patterns, constructing an abstract syntax tree (AST) for pattern matching, and evaluating these patterns against input data using DataFusion. Additionally, minor edits were made to the typos.toml
configuration file.
File | Summary of Changes |
---|---|
src/common/function/src/scalars/matches.rs |
Introduced MatchesFunction for full-text search, including pattern parsing, AST construction, and evaluation. Added relevant structs, enums, and methods alongside tests. |
typos.toml |
Added new configuration entry unqualifed = "unqualifed" |
sequenceDiagram
participant User
participant MatchesFunction
participant DataFusion
participant InputData
User->>MatchesFunction: Provide search pattern
MatchesFunction->>MatchesFunction: Parse search pattern
MatchesFunction->>MatchesFunction: Build AST
MatchesFunction->>DataFusion: Query processing with AST
DataFusion->>InputData: Evaluate patterns
InputData-->>DataFusion: Return results
DataFusion-->>MatchesFunction: Return evaluation results
MatchesFunction-->>User: Provide matching results
Beneath the code, in lines we'll find,
A function born of thoughtful mind.
It parses text, both swift and keen,
To find the match where none had been.
With DataFusion's helping aid,
A search is done, the quest well paid.
For rabbits know, in fields of green,
The best of code, is sharply seen. 🎩🐇✨
[!TIP]
Early access features: enabled
We are currently testing the following features in early access: - **OpenAI `gpt-4o` model for code reviews and chat**: OpenAI claims that this model is better at understanding and generating code than the previous models. We seek your feedback over the next few weeks before making it generally available. Note: - You can enable or disable early access features from the CodeRabbit UI or by updating the CodeRabbit configuration file. - Please join our [Discord Community](https://discord.com/invite/GsXnASn26c) to provide feedback and report issues. - OSS projects are currently opted into early access features by default.
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?
Attention: Patch coverage is 87.91594%
with 69 lines
in your changes missing coverage. Please review.
Project coverage is 84.61%. Comparing base (
4a42371
) to head (b9572ba
). Report is 24 commits behind head on main.
I think the following BNF can be used to guide writing Parser:
Stmt ::= OptionList MustList MustNotList
OptionList ::= ( BoolExpr )*
MustList ::= ( '+'Primary )*
MustNotList ::= ( '-'Primary )*
BoolExpr ::= AndExpr BoolExprTail
BoolExprTail ::= 'OR' AndExpr BoolExprTail | ε
AndExpr ::= Primary AndExprTail
AndExprTail ::= 'AND' Primary AndExprTail | ε
Primary ::= Term | '(' Stmt ')'
@coderabbitai pause @coderabbitai resolve @coderabbitai configuration
@waynexia: I will pause the automatic reviews, resolve all current review comments, and show the current configuration settings.
@coderabbitai configuration
@waynexia: I will pause the review, resolve all comments, and display the current configuration settings.
Unable to process this comment: maximum number of iterations reached.
I hereby agree to the terms of the GreptimeDB CLA.
Refer to a related PR or issue link (optional)
What's changed and what's your intention?
The
matches
function for full-text search.Notice this is only the first naive implementation. Some features are missing so I haven't written many docs in this PR or they will be outdated very soon. Please use the test case
evaluate_matches_without_parenthesis
as docMissing features:
(I remember how things went with the last language project that was rushed in a week 😶🌫️ )
Checklist
Summary by CodeRabbit