Skip to content

FlatMapGroupsWithStateExecHelper Helper Class

== [[FlatMapGroupsWithStateExecHelper]] FlatMapGroupsWithStateExecHelper

FlatMapGroupsWithStateExecHelper is a utility with the main purpose of <> for FlatMapGroupsWithStateExec physical operator.

=== [[createStateManager]] Creating StateManager -- createStateManager Method

[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.