From 811e8f3c3e5f31baa93052d6b4f3d2383eb1fdf2 Mon Sep 17 00:00:00 2001 From: "joey.ljy" Date: Thu, 23 Nov 2023 14:32:06 +0800 Subject: [PATCH] add comments for getRowConstructFuncName --- .../scala/io/glutenproject/utils/VeloxIntermediateData.scala | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backends-velox/src/main/scala/io/glutenproject/utils/VeloxIntermediateData.scala b/backends-velox/src/main/scala/io/glutenproject/utils/VeloxIntermediateData.scala index 03523a6c43b0..773724eb29d1 100644 --- a/backends-velox/src/main/scala/io/glutenproject/utils/VeloxIntermediateData.scala +++ b/backends-velox/src/main/scala/io/glutenproject/utils/VeloxIntermediateData.scala @@ -102,6 +102,11 @@ object VeloxIntermediateData { TypeBuilder.makeStruct(false, structTypeNodes.asJava) } + /** + * Obtain the name of the RowConstruct function, only decimal avg and sum currently require the + * use of row_constructor, while the rest use the Gluten custom modified + * row_constructor_with_null. + */ def getRowConstructFuncName(aggFunc: AggregateFunction): String = aggFunc match { case _: Average | _: Sum if aggFunc.dataType.isInstanceOf[DecimalType] => "row_constructor" case _ => "row_constructor_with_null"