TypedAggregateExpression Expression¶
TypedAggregateExpression
is the <
[[contract]] [source, scala]
package org.apache.spark.sql.execution.aggregate
trait TypedAggregateExpression extends AggregateFunction { // only required methods that have no implementation def aggregator: Aggregator[Any, Any, Any] def inputClass: Option[Class[]] def inputDeserializer: Option[Expression] def inputSchema: Option[StructType] def withInputInfo(deser: Expression, cls: Class[], schema: StructType): TypedAggregateExpression }
TypedAggregateExpression
is used when:
-
TypedColumn
is requested to withInputType (for Dataset.select, KeyValueGroupedDataset.agg and RelationalGroupedDataset.agg operators) -
Column
is requested to generateAlias and named (for Dataset.select and KeyValueGroupedDataset.agg operators) -
RelationalGroupedDataset
is requested to alias (whenRelationalGroupedDataset
is requested to create a DataFrame from aggregate expressions)
.TypedAggregateExpression Contract [cols="1,2",options="header",width="100%"] |=== | Method | Description
| [[aggregator]] aggregator
| Aggregator
| [[inputClass]] inputClass
| Used when...FIXME
| [[inputDeserializer]] inputDeserializer
| Used when...FIXME
| [[inputSchema]] inputSchema
| Used when...FIXME
| [[withInputInfo]] withInputInfo
| Used when...FIXME |===
[[implementations]] .TypedAggregateExpressions [cols="1,2",options="header",width="100%"] |=== | Aggregator | Description
[[ComplexTypedAggregateExpression]] spark-sql-Expression-ComplexTypedAggregateExpression.md[ComplexTypedAggregateExpression] |
---|
[[SimpleTypedAggregateExpression]] spark-sql-Expression-SimpleTypedAggregateExpression.md[SimpleTypedAggregateExpression] |
---|
=== |
=== [[apply]] Creating TypedAggregateExpression -- apply
Factory Method
[source, scala]¶
applyBUF : Encoder, OUT : Encoder: TypedAggregateExpression
apply
...FIXME
apply
is used when Aggregator
is requested to convert itself to a TypedColumn.