feat: scalar regex match physical expr #12270
Open
+924
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Closes #11146.
Rationale for this change
This PR is successor of PR #11455
BinaryExpr
will compile literal regex pattern when it evaluatingRecordBatch
every time, Sometime, the time of compiling regex pattern is also expensive. In our approach, literal regex pattern will be compiled once and cached to be reused in execution. It's will save compile time of pre execution and speed up execution.What changes are included in this PR?
ScalarRegexMatchExpr
to handle regexp match with literal regrex pattern.PhysicalScalarRegexMatchExprNode
in proto to handleScalarRegexMatchExpr
and add arm in funcparse_physical_expr
andserialize_physical_expr
.BinaryExpr
arm increate_physical_expr
. CreatingScalarRegexMatchExpr
instead ofBinaryExpr
when Rhs is string literal expr andop
isRegexMatch | RegexIMatch | RegexNotMatch | RegexNotIMatch
.Are these changes tested?
Yes, test mod in
scalar_regex_match.rs
Are there any user-facing changes?