Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ abstract class VeloxAggregateFunctionsSuite extends VeloxWholeStageTransformerSu
getExecutedPlan(df).count(
plan => {
plan.isInstanceOf[HashAggregateExecTransformer]
}) == 3)
}) == 4)
}
}
}
Expand Down
18 changes: 16 additions & 2 deletions cpp/velox/substrait/SubstraitToVeloxPlanValidator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1167,8 +1167,22 @@ bool SubstraitToVeloxPlanValidator::validateAggRelFunctionType(const ::substrait
for (const auto& signature : signaturesOpt.value()) {
exec::SignatureBinder binder(*signature, types);
if (binder.tryBind()) {
auto resolveType = binder.tryResolveType(
exec::isPartialOutput(funcStep) ? signature->intermediateType() : signature->returnType());
TypePtr resolveType = nullptr;
try {
resolveType = binder.tryResolveType(
exec::isPartialOutput(funcStep) ? signature->intermediateType() : signature->returnType());
} catch (const VeloxException& e) {
if (!exec::isPartialOutput(funcStep) && funcName.find("merge_extract") != std::string::npos) {
// For the merge_extract companion function, result
// types may not always be inferable from the intermediate types. As a
// result, an exception might be thrown during the type resolution process. More
// details can be found in
// https://github.com/facebookincubator/velox/pull/11999#issuecomment-3274577979
// and https://github.com/facebookincubator/velox/issues/12830.
return true;
}
}

if (resolveType == nullptr) {
LOG_VALIDATION_MSG("Validation failed for function " + funcName + " resolve type in AggregateRel.");
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,6 @@ class VeloxTestSettings extends BackendTestSettings {
.exclude("SPARK-22271: mean overflows and returns null for some decimal variables")
// Rewrite this test since it checks the physical operator which is changed in Gluten
.exclude("SPARK-27439: Explain result should match collected result after view change")
// https://github.com/apache/incubator-gluten/issues/10963
.exclude("SPARK-35955: Aggregate avg should not return wrong results for decimal overflow")

enableSuite[GlutenDataFrameNaFunctionsSuite]
.exclude(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -721,8 +721,6 @@ class VeloxTestSettings extends BackendTestSettings {
.excludeGlutenTest("describe")
// Rewrite this test since it checks the physical operator which is changed in Gluten
.exclude("SPARK-27439: Explain result should match collected result after view change")
// https://github.com/apache/incubator-gluten/issues/10963
.exclude("SPARK-35955: Aggregate avg should not return wrong results for decimal overflow")
enableSuite[GlutenDataFrameTimeWindowingSuite]
enableSuite[GlutenDataFrameTungstenSuite]
enableSuite[GlutenDataFrameWindowFunctionsSuite]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -770,8 +770,6 @@ class VeloxTestSettings extends BackendTestSettings {
.exclude("SPARK-41048: Improve output partitioning and ordering with AQE cache")
// Rewrite this test since it checks the physical operator which is changed in Gluten
.exclude("SPARK-27439: Explain result should match collected result after view change")
// https://github.com/apache/incubator-gluten/issues/10963
.exclude("SPARK-35955: Aggregate avg should not return wrong results for decimal overflow")
enableSuite[GlutenDataFrameTimeWindowingSuite]
enableSuite[GlutenDataFrameTungstenSuite]
enableSuite[GlutenDataFrameWindowFunctionsSuite]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -790,8 +790,6 @@ class VeloxTestSettings extends BackendTestSettings {
.exclude("SPARK-41048: Improve output partitioning and ordering with AQE cache")
// Rewrite this test since it checks the physical operator which is changed in Gluten
.exclude("SPARK-27439: Explain result should match collected result after view change")
// https://github.com/apache/incubator-gluten/issues/10963
.exclude("SPARK-35955: Aggregate avg should not return wrong results for decimal overflow")
enableSuite[GlutenDataFrameTimeWindowingSuite]
enableSuite[GlutenDataFrameTungstenSuite]
enableSuite[GlutenDataFrameWindowFunctionsSuite]
Expand Down