-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Implement native support StringView for CONTAINS
function
#12168
Conversation
Signed-off-by: Tai Le Manh <manhtai.lmt@gmail.com>
Signed-off-by: Tai Le Manh <manhtai.lmt@gmail.com>
8508473
to
88aab46
Compare
a71d222
to
45dd141
Compare
I am wondering since the |
yeah, I also mentioned the similar of |
ce80864
to
22f383b
Compare
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.
Thank you @tlm365 -- sorry for the delay in reviewing. Overall this PR looks very cleanly implemented and is easy to read 👌
I had a few questions, but it looks pretty close to me
Thanks again
/// See the documentation [here](https://docs.rs/regex/1.5.4/regex/#grouping-and-flags) | ||
/// for more information. | ||
/// | ||
/// It is inspired / copied from `regexp_is_match_utf8` [arrow-rs]. |
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.
I wonder why we need to haev our own copy here? Is it because the arrow kernel doesn't support StringView yet?
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.
Is it because the arrow kernel doesn't support StringView yet?
Yes, you're right. I intend to update this one in upstream [arrow-rs]. After that, we can eliminate it from this location.
datafusion/functions/Cargo.toml
Outdated
@@ -52,9 +52,9 @@ encoding_expressions = ["base64", "hex"] | |||
# enable math functions | |||
math_expressions = [] | |||
# enable regular expressions | |||
regex_expressions = ["regex"] | |||
regex_expressions = ["regex", "string_expressions"] |
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.
I don't understand the need for this change (which seems to basically make regex_expressions
and string_expressions
the same feature flag)
I see you added datafusion/functions/src/regex/regexp_common.rs
, but that seems only to be used by string functions. Perhaps it would be beter placed somewhere in functions/src/ 🤔
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.
@alamb thanks for reviewing 🙏
Perhaps it would be beter placed somewhere in functions/src/
oh, I agree, will update it soon
f1bff73
to
6267b8d
Compare
Signed-off-by: Tai Le Manh <manhtai.lmt@gmail.com>
6267b8d
to
4344bc8
Compare
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.
Thank you @tlm365 -- looks great to me
Thanks again @tlm365 |
Which issue does this PR close?
Closes #11838.
Rationale for this change
What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?