viirya commented on a change in pull request #32980:
URL: https://github.com/apache/spark/pull/32980#discussion_r659425518



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala
##########
@@ -1030,11 +1032,55 @@ class CodegenContext extends Logging {
   }
 
   /**
-   * Checks and sets up the state and codegen for subexpression elimination. 
This finds the
-   * common subexpressions, generates the code snippets that evaluate those 
expressions and
-   * populates the mapping of common subexpressions to the generated code 
snippets. The generated
-   * code snippets will be returned and should be inserted into generated 
codes before these
-   * common subexpressions actually are used first time.
+   * Evaluates a sequence of `SubExprEliminationState` which represent 
subexpressions. After
+   * evaluating a subexpression, this method will clean up the code block to 
avoid duplicate
+   * evaluation.
+   */
+  def evaluateSubExprEliminationState(subExprStates: 
Iterable[SubExprEliminationState]): String = {

Review comment:
       All its caller side use `Iterable`. If changing to `Seq` here, all 
callers need to add `.toSeq`.




-- 
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