Skip to content

Commit

Permalink
[GLUTEN-8206][VL] Support collect_set in window (#8220)
Browse files Browse the repository at this point in the history
Closes #8206
  • Loading branch information
WangGuangxin authored Dec 13, 2024
1 parent dd72810 commit 05b1e7a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package org.apache.gluten.execution

import org.apache.spark.SparkConf
import org.apache.spark.sql.Row
import org.apache.spark.sql.execution.window.WindowExec
import org.apache.spark.sql.types._

class VeloxWindowExpressionSuite extends WholeStageTransformerSuite {
Expand Down Expand Up @@ -134,11 +133,9 @@ class VeloxWindowExpressionSuite extends WholeStageTransformerSuite {
|FROM
| t
|ORDER BY 1, 2;
|""".stripMargin,
noFallBack = false
|""".stripMargin
) {
// Velox window doesn't support collect_set
checkSparkOperatorMatch[WindowExec]
checkGlutenOperatorMatch[WindowExecTransformer]
}
}
}
Expand Down
10 changes: 0 additions & 10 deletions cpp/velox/substrait/SubstraitToVeloxPlanValidator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -661,16 +661,6 @@ bool SubstraitToVeloxPlanValidator::validate(const ::substrait::WindowRel& windo
}
}

// Validate supported aggregate functions.
static const std::unordered_set<std::string> unsupportedFuncs = {"collect_set"};
for (const auto& funcSpec : funcSpecs) {
auto funcName = SubstraitParser::getNameBeforeDelimiter(funcSpec);
if (unsupportedFuncs.find(funcName) != unsupportedFuncs.end()) {
LOG_VALIDATION_MSG(funcName + " was not supported in WindowRel.");
return false;
}
}

// Validate groupby expression
const auto& groupByExprs = windowRel.partition_expressions();
std::vector<core::TypedExprPtr> expressions;
Expand Down

0 comments on commit 05b1e7a

Please sign in to comment.