This is an automated email from the ASF dual-hosted git repository.
philo-he pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gluten.git
The following commit(s) were added to refs/heads/main by this push:
new 1c4a27ef32 [MINOR][VL] Improve validation log messages for aggregate
function signature binding (#12031)
1c4a27ef32 is described below
commit 1c4a27ef32ea768c1024a33fb163595ef1656aee
Author: Philo He <[email protected]>
AuthorDate: Tue May 5 09:30:49 2026 -0700
[MINOR][VL] Improve validation log messages for aggregate function
signature binding (#12031)
---
.../substrait/SubstraitToVeloxPlanValidator.cc | 24 ++++++++++++++++++----
1 file changed, 20 insertions(+), 4 deletions(-)
diff --git a/cpp/velox/substrait/SubstraitToVeloxPlanValidator.cc
b/cpp/velox/substrait/SubstraitToVeloxPlanValidator.cc
index b175e2aedb..6b10b805ed 100644
--- a/cpp/velox/substrait/SubstraitToVeloxPlanValidator.cc
+++ b/cpp/velox/substrait/SubstraitToVeloxPlanValidator.cc
@@ -1153,7 +1153,7 @@ bool
SubstraitToVeloxPlanValidator::validateAggRelFunctionType(const ::substrait
auto funcName = planConverter_->toAggregationFunctionName(baseFuncName,
funcStep, resultType);
auto signaturesOpt = exec::getAggregateFunctionSignatures(funcName);
if (!signaturesOpt) {
- LOG_VALIDATION_MSG("can not find function signature for " + funcName + "
in AggregateRel.");
+ LOG_VALIDATION_MSG("No function signatures found for function name: " +
funcName);
return false;
}
@@ -1179,8 +1179,8 @@ bool
SubstraitToVeloxPlanValidator::validateAggRelFunctionType(const ::substrait
}
if (resolveType == nullptr) {
- LOG_VALIDATION_MSG("Validation failed for function " + funcName + "
resolve type in AggregateRel.");
- return false;
+ LOG_VALIDATION_MSG("Failed to resolve intermediate/return type for
function " + funcName);
+ break;
}
resolved = true;
@@ -1188,7 +1188,23 @@ bool
SubstraitToVeloxPlanValidator::validateAggRelFunctionType(const ::substrait
}
}
if (!resolved) {
- LOG_VALIDATION_MSG("Validation failed for function " + funcName + " bind
signatures in AggregateRel.");
+ std::vector<std::string> inputTypeStrs;
+ for (const auto& type : types) {
+ inputTypeStrs.push_back(type->toString());
+ }
+
+ std::vector<std::string> signatureStrs;
+ for (const auto& signature : signaturesOpt.value()) {
+ signatureStrs.push_back(signature->toString());
+ }
+
+ LOG_VALIDATION_MSG(fmt::format(
+ "Validation failed for function {} when binding signatures.\n"
+ " Input types: [{}]\n"
+ " Registered signatures:\n {}",
+ funcName,
+ folly::join(", ", inputTypeStrs),
+ folly::join("\n ", signatureStrs)));
return false;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]