xinghuayu007 commented on code in PR #11210:
URL:
https://github.com/apache/incubator-gluten/pull/11210#discussion_r2570299322
##########
cpp/velox/substrait/SubstraitToVeloxPlan.cc:
##########
@@ -231,15 +267,29 @@ core::AggregationNode::Step
SubstraitToVeloxPlanConverter::toAggregationFunction
std::string SubstraitToVeloxPlanConverter::toAggregationFunctionName(
const std::string& baseName,
- const core::AggregationNode::Step& step) {
+ const core::AggregationNode::Step& step,
+ const TypePtr& resultType) {
std::string suffix;
switch (step) {
case core::AggregationNode::Step::kPartial:
suffix = "_partial";
break;
- case core::AggregationNode::Step::kFinal:
- suffix = "_merge_extract";
- break;
+ case core::AggregationNode::Step::kFinal: {
+ auto functionName = baseName + "_merge_extract";
+ auto signatures = exec::getAggregateFunctionSignatures(functionName);
+ if (signatures.has_value() && signatures.value().size() > 0) {
+ // The merge_extract function is registered without suffix.
Review Comment:
nit: Put the comment on line 280.
--
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]