Skip to content

Commit 57171fe

Browse files
committed
fix comments
1 parent a0a0685 commit 57171fe

File tree

1 file changed

+4
-3
lines changed
  • sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer

1 file changed

+4
-3
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -539,9 +539,10 @@ object LimitPushDown extends Rule[LogicalPlan] {
539539
// pushdown Limit.
540540
case LocalLimit(exp, u: Union) =>
541541
LocalLimit(exp, u.copy(children = u.children.map(maybePushLocalLimit(exp, _))))
542-
// Add extra limits below OUTER JOIN. For LEFT OUTER and RIGHT OUTER JOIN we push limits to
543-
// the left and right sides, respectively. It's not safe to push limits below FULL OUTER
544-
// JOIN in the general case without a more invasive rewrite.
542+
// Add extra limits below JOIN. For LEFT OUTER and RIGHT OUTER JOIN we push limits to
543+
// the left and right sides, respectively. For INNER and CROSS JOIN we push limits to
544+
// both the left and right sides if join condition is empty. It's not safe to push limits
545+
// below FULL OUTER JOIN in the general case without a more invasive rewrite.
545546
// We also need to ensure that this limit pushdown rule will not eventually introduce limits
546547
// on both sides if it is applied multiple times. Therefore:
547548
// - If one side is already limited, stack another limit on top if the new limit is smaller.

0 commit comments

Comments
 (0)