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

feat(expr): add regexp_count #11975

Merged
merged 4 commits into from
Sep 1, 2023
Merged

feat(expr): add regexp_count #11975

merged 4 commits into from
Sep 1, 2023

Conversation

xzhseh
Copy link
Contributor

@xzhseh xzhseh commented Aug 30, 2023

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

resolve #11735

Checklist

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features Sqlsmith: Sql feature generation #7934).
  • My PR contains breaking changes. (If it deprecates some features, please create a tracking issue to remove them in the future).
  • All checks passed in ./risedev check (or alias, ./risedev c)
  • My PR changes performance-critical code. (Please run macro/micro-benchmarks and show the results.)
  • My PR contains critical fixes that are necessary to be merged into the latest release. (Please check out the details)

Documentation

  • My PR needs documentation updates. (Please use the Release note section below to summarize the impact on users)

Release note

support regexp_count

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

license-eye has totally checked 4020 files.

Valid Invalid Ignored Fixed
1771 1 2248 0
Click to see the invalid file list
  • src/expr/src/expr/expr_regexp_count.rs

src/expr/src/expr/expr_regexp_count.rs Show resolved Hide resolved
@xzhseh
Copy link
Contributor Author

xzhseh commented Aug 30, 2023

Syntax of regexp_count is as: regexp_count(string, pattern [, start [, flags ]]).
Now the supported flags option is ic, global flag is implicitly supported and could not be specified.

Copy link
Contributor

@wangrunji0408 wangrunji0408 left a comment

Choose a reason for hiding this comment

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

Generally LGTM.

src/expr/src/expr/expr_regexp_count.rs Outdated Show resolved Hide resolved
src/expr/src/expr/expr_regexp_count.rs Outdated Show resolved Hide resolved
src/expr/src/expr/expr_regexp_count.rs Outdated Show resolved Hide resolved
src/expr/src/expr/expr_regexp_count.rs Outdated Show resolved Hide resolved
src/expr/src/expr/expr_regexp_count.rs Outdated Show resolved Hide resolved
src/expr/src/expr/expr_regexp_count.rs Outdated Show resolved Hide resolved
src/expr/src/expr/expr_regexp_count.rs Outdated Show resolved Hide resolved
src/expr/src/expr/expr_regexp_count.rs Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Aug 31, 2023

Codecov Report

Merging #11975 (139fe7b) into main (5913af4) will decrease coverage by 0.04%.
The diff coverage is 0.82%.

@@            Coverage Diff             @@
##             main   #11975      +/-   ##
==========================================
- Coverage   69.90%   69.86%   -0.04%     
==========================================
  Files        1389     1390       +1     
  Lines      232946   233066     +120     
==========================================
- Hits       162840   162838       -2     
- Misses      70106    70228     +122     
Flag Coverage Δ
rust 69.86% <0.82%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
src/expr/src/expr/build.rs 78.43% <0.00%> (-0.52%) ⬇️
src/expr/src/expr/expr_regexp.rs 0.00% <ø> (ø)
src/expr/src/expr/expr_regexp_count.rs 0.00% <0.00%> (ø)
src/expr/src/expr/mod.rs 62.96% <ø> (ø)
src/frontend/src/expr/pure.rs 87.69% <ø> (ø)
src/frontend/src/expr/type_inference/func.rs 82.13% <0.00%> (-0.20%) ⬇️
src/frontend/src/binder/expr/function.rs 78.98% <100.00%> (+0.01%) ⬆️

... and 3 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@xzhseh
Copy link
Contributor Author

xzhseh commented Aug 31, 2023

cc @TennyZhuang @wangrunji0408, I'm ready to merge.

Copy link
Contributor

@wangrunji0408 wangrunji0408 left a comment

Choose a reason for hiding this comment

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

LGTM! Good work.

@wangrunji0408 wangrunji0408 added this pull request to the merge queue Sep 1, 2023
Merged via the queue into main with commit 06dd9ba Sep 1, 2023
36 of 37 checks passed
@wangrunji0408 wangrunji0408 deleted the xzhseh/feat-regexp-count branch September 1, 2023 04:31
Li0k pushed a commit that referenced this pull request Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

support regexp_count
2 participants