From ba0f88dbc5eceff56a9b0b47449c8e2198088d18 Mon Sep 17 00:00:00 2001 From: zml1206 Date: Thu, 16 Jan 2025 18:18:30 +0800 Subject: [PATCH 1/2] [MINOR] Fix comment of function VeloxAggregateFunctionsBuilder.create --- .../execution/HashAggregateExecTransformer.scala | 13 ++++++------- 1 file changed, 6 insertions(+), 7 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 9a6ba3a220f1..d863a913a25b 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 @@ -119,7 +119,7 @@ abstract class HashAggregateExecTransformer( * @return * a project rel */ - def applyExtractStruct( + private def applyExtractStruct( context: SubstraitContext, aggRel: RelNode, operatorId: Long, @@ -260,7 +260,7 @@ abstract class HashAggregateExecTransformer( * Return the output types after partial aggregation through Velox. * @return */ - def getPartialAggOutTypes: JList[TypeNode] = { + private def getPartialAggOutTypes: JList[TypeNode] = { val typeNodeList = new JArrayList[TypeNode]() groupingExpressions.foreach( expression => { @@ -398,8 +398,7 @@ abstract class HashAggregateExecTransformer( childNodes.add(expressionNode) } } - exprNodes.add( - getRowConstructNode(args, childNodes, newInputAttributes.toSeq, aggFunc)) + exprNodes.add(getRowConstructNode(args, childNodes, newInputAttributes, aggFunc)) case other => throw new GlutenNotSupportException(s"$other is not supported.") } @@ -669,13 +668,13 @@ abstract class HashAggregateExecTransformer( object VeloxAggregateFunctionsBuilder { /** - * Create an scalar function for the input aggregate function. + * Create a scalar function for the input aggregate function. * @param args: * the function map. * @param aggregateFunc: * the input aggregate function. - * @param forMergeCompanion: - * whether this is a special case to solve mixed aggregation phases. + * @param mode: + * the mode of input aggregate function. * @return */ def create( From 7f2100fc17ee2ddc8ae9147b2505ce2f22fd37c9 Mon Sep 17 00:00:00 2001 From: zml1206 Date: Thu, 16 Jan 2025 18:35:41 +0800 Subject: [PATCH 2/2] fix --- .../apache/gluten/execution/HashAggregateExecTransformer.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 d863a913a25b..2cf297ec97c0 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 @@ -398,7 +398,8 @@ abstract class HashAggregateExecTransformer( childNodes.add(expressionNode) } } - exprNodes.add(getRowConstructNode(args, childNodes, newInputAttributes, aggFunc)) + exprNodes.add( + getRowConstructNode(args, childNodes, newInputAttributes.toSeq, aggFunc)) case other => throw new GlutenNotSupportException(s"$other is not supported.") }