kecookier commented on code in PR #6312:
URL: https://github.com/apache/incubator-gluten/pull/6312#discussion_r1665675723
##########
cpp/velox/substrait/SubstraitToVeloxPlanValidator.cc:
##########
@@ -159,10 +159,19 @@ bool SubstraitToVeloxPlanValidator::validateRegexExpr(
LOG_VALIDATION_MSG("Pattern is not string literal for " + name);
return false;
}
-
const auto& pattern = patternArg.literal().string();
+
+ std::string rewrite;
+ if (name == "regexp_replace " && scalarFunction.arguments().size() > 2) {
+ 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;
Review Comment:
Thank you for the explanation. I will modify the code according to your
suggestions.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]