Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class IncrementalExecution(
StreamingDeduplicationStrategy :: Nil
}

private val numStateStores = offsetSeqMetadata.conf.get(SQLConf.SHUFFLE_PARTITIONS.key)
private[sql] val numStateStores = offsetSeqMetadata.conf.get(SQLConf.SHUFFLE_PARTITIONS.key)
.map(SQLConf.SHUFFLE_PARTITIONS.valueConverter)
.getOrElse(sparkSession.sessionState.conf.numShufflePartitions)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -450,8 +450,8 @@ trait StreamTest extends QueryTest with SharedSQLContext with TimeLimits with Be
// This can often catch hard to debug errors when developing stateful operators
val executedPlan = currentStream.lastExecution.executedPlan
executedPlan.collect { case s: StatefulOperator => s }.foreach { s =>
assert(s.stateInfo.isDefined)
assert(s.stateInfo.get.numPartitions >= 1)
assert(
s.stateInfo.map(_.numPartitions).contains(currentStream.lastExecution.numStateStores))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this change?


s.requiredChildDistribution.foreach { d =>
withClue(s"$s specifies incorrect # partitions in requiredChildDistribution $d") {
Expand Down