Skip to content

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:

  • StatefulOpClusteredDistribution when enabled
  • ClusteredDistribution (Spark SQL) otherwise

getCompatibleDistribution is used when: