Skip to content

Commit

Permalink
add comments for getRowConstructFuncName
Browse files Browse the repository at this point in the history
  • Loading branch information
liujiayi771 committed Nov 23, 2023
1 parent 18823d1 commit 811e8f3
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 811e8f3

Please sign in to comment.