Skip to content
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

fix(index): encode string type to original data to enable fst regex to work #3324

Merged

Conversation

zhongzc
Copy link
Contributor

@zhongzc zhongzc commented Feb 19, 2024

I hereby agree to the terms of the GreptimeDB CLA

What's changed and what's your intention?

Previously, when encoding string keys into an FST using the memcomparable format, additional prefixes and suffixes beyond the original string data were added, which could lead to inaccuracies under certain regex query conditions. This PR specifically addresses the encoding of strings: encoding is now done directly based on the original data.

Additionally, unit tests related to SstIndexCreator have been added. These tests link together both the construction and querying of indexes, increasing confidence in their correctness.

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.
  • This PR does not require documentation updates.

Refer to a related PR or issue link (optional)

…o work

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>
@github-actions github-actions bot added the docs-not-required This change does not impact docs. label Feb 19, 2024
Copy link

codecov bot commented Feb 19, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (4810c91) 85.31% compared to head (f6a3a49) 84.95%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3324      +/-   ##
==========================================
- Coverage   85.31%   84.95%   -0.37%     
==========================================
  Files         875      875              
  Lines      142521   142826     +305     
==========================================
- Hits       121589   121335     -254     
- Misses      20932    21491     +559     

Copy link
Contributor

@killme2008 killme2008 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@fengjiachun fengjiachun left a comment

Choose a reason for hiding this comment

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

LGTM

@fengjiachun fengjiachun added this pull request to the merge queue Feb 19, 2024
Merged via the queue into GreptimeTeam:main with commit 40f43de Feb 19, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-not-required This change does not impact docs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants