FlatMapGroupsWithState Unary Logical Operator
FlatMapGroupsWithState is a unary logical operator (i.e. LogicalPlan) that is created to represent the following operators in KeyValueGroupedDataset:
|
Note
|
|
Creating SerializeFromObject with FlatMapGroupsWithState — apply Factory Method
|
1 2 3 4 5 6 7 8 9 10 11 12 |
apply[K: Encoder, V: Encoder, S: Encoder, U: Encoder]( func: (Any, Iterator[Any], LogicalGroupState[Any]) => Iterator[Any], groupingAttributes: Seq[Attribute], dataAttributes: Seq[Attribute], outputMode: OutputMode, isMapGroupsWithState: Boolean, timeout: GroupStateTimeout, child: LogicalPlan): LogicalPlan |
apply creates a SerializeFromObject logical operator with a FlatMapGroupsWithState as its child logical operator.
Internally, apply creates SerializeFromObject object consumer (aka unary logical operator) with FlatMapGroupsWithState logical plan.
Internally, apply finds ExpressionEncoder for the type S and creates a FlatMapGroupsWithState with UnresolvedDeserializer for the types K and V.
In the end, apply creates a SerializeFromObject object consumer with the FlatMapGroupsWithState.
|
Note
|
apply is used when flatMapGroupsWithState is executed.
|
spark技术分享