HeartSaVioR commented on a change in pull request #35419:
URL: https://github.com/apache/spark/pull/35419#discussion_r805734667



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/physical/partitioning.scala
##########
@@ -90,6 +90,34 @@ case class ClusteredDistribution(
   }
 }
 
+/**
+ * Represents the requirement of distribution on the stateful operator.
+ *
+ * Each partition in stateful operator initializes state store(s), which are 
independent with state
+ * store(s) in other partitions. Since it is not possible to repartition the 
data in state store,
+ * Spark should make sure the physical partitioning of the stateful operator 
is unchanged across
+ * Spark versions. Violation of this requirement may bring silent correctness 
issue.
+ *
+ * Since this distribution relies on [[HashPartitioning]] on the physical 
partitioning of the
+ * stateful operator, only [[HashPartitioning]] can satisfy this distribution.

Review comment:
       #35512




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to