PHILO-HE commented on code in PR #6312:
URL: https://github.com/apache/incubator-gluten/pull/6312#discussion_r1665006748
##########
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:
This check will make this function always fall back if non-constant
replacement string is used.
Please check whether this comment makes sense:
https://github.com/apache/incubator-gluten/issues/6224#issuecomment-2207890612.
--
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]