Skip to content

Commit 71b67cb

Browse files
committed
Add more comment.
1 parent f777855 commit 71b67cb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/EquivalentExpressions.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,9 @@ class EquivalentExpressions {
172172

173173
/**
174174
* Orders [Expression] by parent/child relations. The child expression is smaller
175-
* than parent expression.
175+
* than parent expression. If there is child-parent relationships among the subexpressions,
176+
* we want the child expressions come first than parent expressions, so we can replace
177+
* child expressions in parent expressions with subexpression evaluation.
176178
*/
177179
class ExpressionOrdering extends Ordering[Expression] {
178180
override def compare(x: Expression, y: Expression): Int = {

0 commit comments

Comments
 (0)