pan3793 edited a comment on pull request #2225:
URL: 
https://github.com/apache/incubator-kyuubi/pull/2225#issuecomment-1079888703


   > `dataset.take` just like the incremental mode which run job partition by 
partition if previous partitions data has not satisfied the limit number.  
`dataset.limit.collect` will run all partitions to do local limit then do 
global limit in one partition.
   
   I would argue that `dataset.take` is same as `dataset.limit.collect`
   
   ```
   def take(n: Int): Array[T] = head(n)
   def head(n: Int): Array[T] = withAction("head", 
limit(n).queryExecution)(collectFromPlan)
   def collect(): Array[T] = withAction("collect", 
queryExecution)(collectFromPlan)
   ```


-- 
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.

To unsubscribe, e-mail: [email protected]

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