ScalaUDAF Expression¶
ScalaUDAF
is an ImperativeAggregate expression.
ScalaUDAF
is a UserDefinedExpression.
ScalaUDAF
is a NonSQLExpression
.
Deprecation
ScalaUDAF
uses UserDefinedAggregateFunction class that is marked as deprecated as of Spark SQL 3.0.0 with the following comment:
Aggregator[IN, BUF, OUT] should now be registered as a UDF via the functions.udaf(agg) method.
Creating Instance¶
ScalaUDAF
takes the following to be created:
- Children (Expressions)
- UserDefinedAggregateFunction
-
mutableAggBufferOffset
(default:0
) -
inputAggBufferOffset
(default:0
) - Name (optional)
ScalaUDAF
is created when:
UDFRegistration
is requested to register a UserDefinedAggregateFunctionUserDefinedAggregateFunction
is requested to create a Column for a UDAF and distinctSparkUDFExpressionBuilder
is requested tomakeExpression