cloud-fan commented on a change in pull request #32980:
URL: https://github.com/apache/spark/pull/32980#discussion_r655564938



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala
##########
@@ -76,24 +76,32 @@ object ExprCode {
 /**
  * State used for subexpression elimination.
  *
+ * @param code The sequence of statements required to evaluate the 
subexpression.
  * @param isNull A term that holds a boolean value representing whether the 
expression evaluated
  *               to null.
  * @param value A term for a value of a common sub-expression. Not valid if 
`isNull`
  *              is set to `true`.
+ * @param childrenSubExprs The sequence of subexpressions as the children 
expressions. Before
+ *                         evaluating this subexpression, we should evaluate 
all children
+ *                         subexpressions first. This is used if we want to 
selectively evaluate
+ *                         particular subexpressions, instead of all at once. 
In the case, we need
+ *                         to make sure we evaluate all children 
subexpressions too.
  */
-case class SubExprEliminationState(isNull: ExprValue, value: ExprValue)
+case class SubExprEliminationState(

Review comment:
       Now this looks very similar to `ExprCode` with children tracked...




-- 
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:
[email protected]



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

Reply via email to