You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/07/03 06:51:33 UTC

[GitHub] [spark] cloud-fan commented on a change in pull request #25039: [SPARK-28237][SQL] Add an Idempotent batch strategy to catch potential bugs in corresponding rules

cloud-fan commented on a change in pull request #25039: [SPARK-28237][SQL] Add an Idempotent batch strategy to catch potential bugs in corresponding rules
URL: https://github.com/apache/spark/pull/25039#discussion_r299799765
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/rules/RuleExecutor.scala
 ##########
 @@ -47,6 +47,9 @@ abstract class RuleExecutor[TreeType <: TreeNode[_]] extends Logging {
    */
   abstract class Strategy { def maxIterations: Int }
 
+  /** A strategy that is idempotent, i.e. additional runs should not change query plans */
+  case object Idempotent extends Strategy { val maxIterations = 1 }
+
   /** A strategy that only runs once. */
   case object Once extends Strategy { val maxIterations = 1 }
 
 Review comment:
   now we have both `Once` and `Idempotent`, when to pick which?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org