cloud-fan commented on a change in pull request #32980:
URL: https://github.com/apache/spark/pull/32980#discussion_r656045521
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala
##########
@@ -76,24 +76,26 @@ object ExprCode {
/**
* State used for subexpression elimination.
*
- * @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 eval The source code for evaluating the subexpression.
+ * @param children 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.
Review comment:
Your previous PR improves `EquivalentExpressions` to always return child
subexpression first. It seems that PR is not useful after this PR because we
track the children explicitly?
--
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]