-
Notifications
You must be signed in to change notification settings - Fork 453
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
[VL] Validate unsupported rewrite string in Re2 #6312
Conversation
Thanks for opening a pull request! Could you open an issue for this pull request on Github Issues? https://github.com/apache/incubator-gluten/issues Then could you also rename commit message and pull request title in the following format?
See also: |
9128a2a
to
642ed1d
Compare
@GlutenPerfBot benchmark |
ACK, will benchmark TPCH/DS on this pull request |
===== Performance report for TPCH SF2000 with Velox backend, for reference only ====
|
642ed1d
to
e447192
Compare
===== Performance report for TPCDS SF2000 with Velox backend, for reference only ====
|
const auto& rewriteArg = scalarFunction.arguments()[2].value(); | ||
if (!rewriteArg.has_literal() || !rewriteArg.literal().has_string()) { | ||
LOG_VALIDATION_MSG("Rewrite is not string literal for " + name); | ||
return false; |
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.
This check will make this function always fall back if non-constant replacement string is used.
Please check whether this comment makes sense: #6224 (comment).
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 for the explanation. I will modify the code according to your suggestions.
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.
@kecookier, if the proposal is feasible, you can file a drafted pr in velox to see whether the community accepts that. Thanks!
ACK, will benchmark TPCH/DS on this pull request |
1 similar comment
ACK, will benchmark TPCH/DS on this pull request |
===== Performance report for TPCDS SF2000 with Velox backend, for reference only ====
|
ACK, will benchmark TPCH/DS on this pull request |
===== Performance report for TPCH SF2000 with Velox backend, for reference only ====
|
This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days. |
This PR was auto-closed because it has been stalled for 10 days with no activity. Please feel free to reopen if it is still valid. Thanks. |
What changes were proposed in this pull request?
Now we only validate the regex pattern, but we also need to validate the rewrite string. The
regexp_function
will callRE2::GlobalReplace()
, which will swallow the errors thrown byRE2::Rewrite()
.When RE2::CheckRewriteString() fails, Gluten will fallback to vanilla and print a log like:
(Fixes: #6224)
How was this patch tested?
Exist CI.