This is an automated email from the ASF dual-hosted git repository.
philo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-gluten.git
The following commit(s) were added to refs/heads/main by this push:
new 870bb95e42 [VL] Correct the conversion from `AggregateRel.groupings`
to `AggregationNode.groupingKeys` (#11264)
870bb95e42 is described below
commit 870bb95e4206225b79c92e3d9ad14b022fb9fe7a
Author: Zouxxyy <[email protected]>
AuthorDate: Mon Dec 15 01:42:59 2025 +0800
[VL] Correct the conversion from `AggregateRel.groupings` to
`AggregationNode.groupingKeys` (#11264)
---
cpp/velox/substrait/SubstraitToVeloxPlan.cc | 6 ++++--
.../org/apache/gluten/substrait/rel/AggregateRelNode.java | 12 ------------
2 files changed, 4 insertions(+), 14 deletions(-)
diff --git a/cpp/velox/substrait/SubstraitToVeloxPlan.cc
b/cpp/velox/substrait/SubstraitToVeloxPlan.cc
index e93ea75ba8..1b1ee1f493 100644
--- a/cpp/velox/substrait/SubstraitToVeloxPlan.cc
+++ b/cpp/velox/substrait/SubstraitToVeloxPlan.cc
@@ -463,8 +463,10 @@ core::PlanNodePtr
SubstraitToVeloxPlanConverter::toVeloxPlan(const ::substrait::
std::vector<core::FieldAccessTypedExprPtr> veloxGroupingExprs;
// Get the grouping expressions.
- for (const auto& grouping : aggRel.groupings()) {
- for (const auto& groupingExpr : grouping.grouping_expressions()) {
+ VELOX_CHECK(
+ aggRel.groupings().size() <= 1, "At most one grouping is supported, but
got {}.", aggRel.groupings().size());
+ if (aggRel.groupings().size() == 1) {
+ for (const auto& groupingExpr :
aggRel.groupings()[0].grouping_expressions()) {
// Velox's groupings are limited to be Field.
veloxGroupingExprs.emplace_back(exprConverter_->toVeloxExpr(groupingExpr.selection(),
inputType));
}
diff --git
a/gluten-substrait/src/main/java/org/apache/gluten/substrait/rel/AggregateRelNode.java
b/gluten-substrait/src/main/java/org/apache/gluten/substrait/rel/AggregateRelNode.java
index b75df46d63..61ed751e45 100644
---
a/gluten-substrait/src/main/java/org/apache/gluten/substrait/rel/AggregateRelNode.java
+++
b/gluten-substrait/src/main/java/org/apache/gluten/substrait/rel/AggregateRelNode.java
@@ -36,18 +36,6 @@ public class AggregateRelNode implements RelNode,
Serializable {
private final List<ExpressionNode> filters = new ArrayList<>();
private final AdvancedExtensionNode extensionNode;
- AggregateRelNode(
- RelNode input,
- List<ExpressionNode> groupings,
- List<AggregateFunctionNode> aggregateFunctionNodes,
- List<ExpressionNode> filters) {
- this.input = input;
- this.groupings.addAll(groupings);
- this.aggregateFunctionNodes.addAll(aggregateFunctionNodes);
- this.filters.addAll(filters);
- this.extensionNode = null;
- }
-
AggregateRelNode(
RelNode input,
List<ExpressionNode> groupings,
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]