StatefulOperatorPartitioning¶
getCompatibleDistribution¶
getCompatibleDistribution(
expressions: Seq[Expression],
numPartitions: Int,
conf: SQLConf): Distribution
getCompatibleDistribution(
expressions: Seq[Expression],
stateInfo: StatefulOperatorStateInfo,
conf: SQLConf): Distribution
getCompatibleDistribution returns the following Distributions (Spark SQL) based on spark.sql.streaming.statefulOperator.useStrictDistribution configuration property:
StatefulOpClusteredDistributionwhen enabledClusteredDistribution(Spark SQL) otherwise
getCompatibleDistribution is used when:
BaseAggregateExec(Spark SQL) is requested for the required child output distribution (of a streaming query)UpdatingSessionsExecis requested for the required child output distribution (of a streaming query)FlatMapGroupsWithStateExecis requested for the required child output distributionStateStoreRestoreExecis requested for the required child output distributionStateStoreSaveExecis requested for the required child output distributionSessionWindowStateStoreRestoreExecis requested for the required child output distributionSessionWindowStateStoreSaveExecis requested for the required child output distributionStreamingDeduplicateExecis requested for the required child output distribution