Skip to content

FlatMapGroupsWithStateExecHelper

FlatMapGroupsWithStateExecHelper utility is mainly used to creating a StateManager for FlatMapGroupsWithStateExec physical operator.

=== [[createStateManager]] Creating StateManager

[source, scala]

createStateManager( stateEncoder: ExpressionEncoder[Any], shouldStoreTimestamp: Boolean, stateFormatVersion: Int): StateManager


createStateManager simply creates a <> (with the stateEncoder and shouldStoreTimestamp flag) based on stateFormatVersion:

  • <> for 1

  • <> for 2

createStateManager throws an IllegalArgumentException for stateFormatVersion not 1 or 2:

Version [stateFormatVersion] is invalid

createStateManager is used for the StateManager for FlatMapGroupsWithStateExec physical operator.