niyue commented on code in PR #38873:
URL: https://github.com/apache/arrow/pull/38873#discussion_r1408790772
##########
cpp/src/gandiva/regex_functions_holder.cc:
##########
@@ -221,18 +214,17 @@ Status ExtractHolder::Make(const FunctionNode& node,
literal == nullptr ||
!IsArrowStringLiteral(literal->return_type()->id()),
Status::Invalid("'extract' function requires a literal as the second
parameter"));
- return ExtractHolder::Make(std::get<std::string>(literal->holder()), holder);
+ return ExtractHolder::Make(std::get<std::string>(literal->holder()));
}
-Status ExtractHolder::Make(const std::string& sql_pattern,
- std::shared_ptr<ExtractHolder>* holder) {
+Result<std::shared_ptr<ExtractHolder>> ExtractHolder::Make(
+ const std::string& sql_pattern) {
auto lholder = std::shared_ptr<ExtractHolder>(new
ExtractHolder(sql_pattern));
Review Comment:
This is not possible since this is called inside a factory function `Make`
and the constructor is intentionally marked as `private` so that users can only
use the factory function for creating instances, and `make_shared` can only
call public constructor.
--
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]