This is an automated email from the ASF dual-hosted git repository.
felixybw 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 5ad38b83da [GLUTEN-10491][VL] Simplify the extractStructNeeded for
HashAggregateExecTransformer (#10492)
5ad38b83da is described below
commit 5ad38b83da14fd93ed2906b5c8f33bc4f8f30b3d
Author: Jiaan Geng <[email protected]>
AuthorDate: Thu Aug 21 01:34:49 2025 +0800
[GLUTEN-10491][VL] Simplify the extractStructNeeded for
HashAggregateExecTransformer (#10492)
This PR proposes to simplify the extractStructNeeded for
HashAggregateExecTransformer
---
.../gluten/execution/HashAggregateExecTransformer.scala | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git
a/backends-velox/src/main/scala/org/apache/gluten/execution/HashAggregateExecTransformer.scala
b/backends-velox/src/main/scala/org/apache/gluten/execution/HashAggregateExecTransformer.scala
index fbf32cc45e..3148e769df 100644
---
a/backends-velox/src/main/scala/org/apache/gluten/execution/HashAggregateExecTransformer.scala
+++
b/backends-velox/src/main/scala/org/apache/gluten/execution/HashAggregateExecTransformer.scala
@@ -96,18 +96,10 @@ abstract class HashAggregateExecTransformer(
* @return
* extracting needed or not.
*/
- private def extractStructNeeded(): Boolean = {
- aggregateExpressions.exists {
- expr =>
- expr.aggregateFunction match {
- case aggFunc if aggFunc.aggBufferAttributes.size > 1 =>
- expr.mode match {
- case Partial | PartialMerge => true
- case _ => false
- }
- case _ => false
- }
- }
+ private def extractStructNeeded(): Boolean = aggregateExpressions.exists {
+ case AggregateExpression(aggFunc, Partial | PartialMerge, _, _, _) =>
+ aggFunc.aggBufferAttributes.size > 1
+ case _ => false
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]