Github user dongjoon-hyun commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18851#discussion_r131530034
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/basicLogicalOperators.scala
 ---
    @@ -643,6 +657,27 @@ case class Pivot(
       }
     }
     
    +/**
    + * A constructor for creating a logical limit, which is split into two 
separate logical nodes:
    + * a [[LocalLimit]], which is a partition local limit, followed by a 
[[GlobalLimit]].
    + *
    + * This muds the water for clean logical/physical separation, and is done 
for better limit pushdown.
    + * In distributed query processing, a non-terminal global limit is 
actually an expensive operation
    + * because it requires coordination (in Spark this is done using a 
shuffle).
    + *
    + * In most cases when we want to push down limit, it is often better to 
only push some partition
    + * local limit. Consider the following:
    + *
    + *   GlobalLimit(Union(A, B)
    --- End diff --
    
    Missing ')' at the end: `GlobalLimit(Union(A, B)` -> `GlobalLimit(Union(A, 
B))`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to