[GitHub] spark issue #15596: [SQL] Remove shuffle codes in CollectLimitExec

2016-10-25 Thread SparkQA
Github user SparkQA commented on the issue:

https://github.com/apache/spark/pull/15596
  
**[Test build #67492 has 
started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/67492/consoleFull)**
 for PR 15596 at commit 
[`fbf4fd6`](https://github.com/apache/spark/commit/fbf4fd679bea77106cf2ab94882da1182ee38932).


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



[GitHub] spark issue #15596: [SQL] Remove shuffle codes in CollectLimitExec

2016-10-24 Thread AmplabJenkins
Github user AmplabJenkins commented on the issue:

https://github.com/apache/spark/pull/15596
  
Merged build finished. Test PASSed.


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



[GitHub] spark issue #15596: [SQL] Remove shuffle codes in CollectLimitExec

2016-10-24 Thread SparkQA
Github user SparkQA commented on the issue:

https://github.com/apache/spark/pull/15596
  
**[Test build #67480 has 
finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/67480/consoleFull)**
 for PR 15596 at commit 
[`76a3eaf`](https://github.com/apache/spark/commit/76a3eaf16ca68f1c0329cead866f8e2941285507).
 * This patch passes all tests.
 * This patch merges cleanly.
 * This patch adds no public classes.


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



[GitHub] spark issue #15596: [SQL] Remove shuffle codes in CollectLimitExec

2016-10-24 Thread AmplabJenkins
Github user AmplabJenkins commented on the issue:

https://github.com/apache/spark/pull/15596
  
Test PASSed.
Refer to this link for build results (access rights to CI server needed): 
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/67480/
Test PASSed.


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



[GitHub] spark issue #15596: [SQL] Remove shuffle codes in CollectLimitExec

2016-10-24 Thread viirya
Github user viirya commented on the issue:

https://github.com/apache/spark/pull/15596
  
> In typical operation, we don't necessarily expect CollectLimitExec to 
appear in the middle of a query plan, so CollectLimitExec.execute() should 
generally only be called in special cases such as calling .rdd() on a limited 
RDD then performing further operations on it. This is why I didn't use 
EnsureRequirements here: if we did, then we'd end up shuffling all limited 
partitions to a single non-driver partition, then limiting that and collecting 
to the driver, degrading performance in the case where a limit is the terminal 
operation in the query plan.

Yeah, I think I understand the intent. So in the `executeCollect`, I do 
strip off the shuffling if needed.



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



[GitHub] spark issue #15596: [SQL] Remove shuffle codes in CollectLimitExec

2016-10-24 Thread SparkQA
Github user SparkQA commented on the issue:

https://github.com/apache/spark/pull/15596
  
**[Test build #67480 has 
started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/67480/consoleFull)**
 for PR 15596 at commit 
[`76a3eaf`](https://github.com/apache/spark/commit/76a3eaf16ca68f1c0329cead866f8e2941285507).


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



[GitHub] spark issue #15596: [SQL] Remove shuffle codes in CollectLimitExec

2016-10-24 Thread viirya
Github user viirya commented on the issue:

https://github.com/apache/spark/pull/15596
  
retest this please.


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



[GitHub] spark issue #15596: [SQL] Remove shuffle codes in CollectLimitExec

2016-10-24 Thread JoshRosen
Github user JoshRosen commented on the issue:

https://github.com/apache/spark/pull/15596
  
For a bit of background on `CollectLimitExec`, note that the intent of this 
operator is to be able to optimize the special case where a limit is the 
terminal operator of a plan: in this case, we don't need to perform a shuffle 
because we can have the driver run multiple jobs which scan an increasingly 
large portion of the RDD to get the limited items; in a nutshell, the goal is 
to allow a logic similar to the RDD `take()` action to stop early without 
having to compute all partitions of the limited RDD.

In typical operation, we don't necessarily expect `CollectLimitExec` to 
appear in the middle of a query plan, so `CollectLimitExec.execute()` should 
generally only be called in special cases such as calling `.rdd()` on a limited 
RDD then performing further operations on it. This is why I didn't use 
`EnsureRequirements` here: if we did, then we'd end up shuffling all limited 
partitions to a single non-driver partition, then limiting that and collecting 
to the driver, degrading performance in the case where a limit is the terminal 
operation in the query plan.


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



[GitHub] spark issue #15596: [SQL] Remove shuffle codes in CollectLimitExec

2016-10-24 Thread SparkQA
Github user SparkQA commented on the issue:

https://github.com/apache/spark/pull/15596
  
**[Test build #67452 has 
finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/67452/consoleFull)**
 for PR 15596 at commit 
[`76a3eaf`](https://github.com/apache/spark/commit/76a3eaf16ca68f1c0329cead866f8e2941285507).
 * This patch **fails PySpark unit tests**.
 * This patch merges cleanly.
 * This patch adds no public classes.


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



[GitHub] spark issue #15596: [SQL] Remove shuffle codes in CollectLimitExec

2016-10-24 Thread AmplabJenkins
Github user AmplabJenkins commented on the issue:

https://github.com/apache/spark/pull/15596
  
Test FAILed.
Refer to this link for build results (access rights to CI server needed): 
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/67452/
Test FAILed.


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



[GitHub] spark issue #15596: [SQL] Remove shuffle codes in CollectLimitExec

2016-10-24 Thread AmplabJenkins
Github user AmplabJenkins commented on the issue:

https://github.com/apache/spark/pull/15596
  
Merged build finished. Test FAILed.


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



[GitHub] spark issue #15596: [SQL] Remove shuffle codes in CollectLimitExec

2016-10-24 Thread viirya
Github user viirya commented on the issue:

https://github.com/apache/spark/pull/15596
  
hmmm, I don't image that it is needed for such related changes to remove 
shuffle codes in CollectLimitExec.

This is not a serious issue and if you think this change is too big for the 
purpose, please let me know. Thanks!


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



[GitHub] spark issue #15596: [SQL] Remove shuffle codes in CollectLimitExec

2016-10-24 Thread SparkQA
Github user SparkQA commented on the issue:

https://github.com/apache/spark/pull/15596
  
**[Test build #67452 has 
started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/67452/consoleFull)**
 for PR 15596 at commit 
[`76a3eaf`](https://github.com/apache/spark/commit/76a3eaf16ca68f1c0329cead866f8e2941285507).


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



[GitHub] spark issue #15596: [SQL] Remove shuffle codes in CollectLimitExec

2016-10-23 Thread AmplabJenkins
Github user AmplabJenkins commented on the issue:

https://github.com/apache/spark/pull/15596
  
Test FAILed.
Refer to this link for build results (access rights to CI server needed): 
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/67427/
Test FAILed.


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



[GitHub] spark issue #15596: [SQL] Remove shuffle codes in CollectLimitExec

2016-10-23 Thread AmplabJenkins
Github user AmplabJenkins commented on the issue:

https://github.com/apache/spark/pull/15596
  
Merged build finished. Test FAILed.


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



[GitHub] spark issue #15596: [SQL] Remove shuffle codes in CollectLimitExec

2016-10-23 Thread SparkQA
Github user SparkQA commented on the issue:

https://github.com/apache/spark/pull/15596
  
**[Test build #67427 has 
finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/67427/consoleFull)**
 for PR 15596 at commit 
[`6d7095c`](https://github.com/apache/spark/commit/6d7095ce50d845377621b6f969732c3fff4a90e3).
 * This patch **fails Spark unit tests**.
 * This patch merges cleanly.
 * This patch adds no public classes.


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



[GitHub] spark issue #15596: [SQL] Remove shuffle codes in CollectLimitExec

2016-10-23 Thread SparkQA
Github user SparkQA commented on the issue:

https://github.com/apache/spark/pull/15596
  
**[Test build #67427 has 
started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/67427/consoleFull)**
 for PR 15596 at commit 
[`6d7095c`](https://github.com/apache/spark/commit/6d7095ce50d845377621b6f969732c3fff4a90e3).


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



[GitHub] spark issue #15596: [SQL] Remove shuffle codes in CollectLimitExec

2016-10-23 Thread hvanhovell
Github user hvanhovell commented on the issue:

https://github.com/apache/spark/pull/15596
  
@JoshRosen could you shed some light on why we are not using the regular 
`EnsureRequirements` based code path for `CollectLimitExec`?


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



[GitHub] spark issue #15596: [SQL] Remove shuffle codes in CollectLimitExec

2016-10-21 Thread AmplabJenkins
Github user AmplabJenkins commented on the issue:

https://github.com/apache/spark/pull/15596
  
Test FAILed.
Refer to this link for build results (access rights to CI server needed): 
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/67371/
Test FAILed.


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



[GitHub] spark issue #15596: [SQL] Remove shuffle codes in CollectLimitExec

2016-10-21 Thread AmplabJenkins
Github user AmplabJenkins commented on the issue:

https://github.com/apache/spark/pull/15596
  
Merged build finished. Test FAILed.


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



[GitHub] spark issue #15596: [SQL] Remove shuffle codes in CollectLimitExec

2016-10-21 Thread SparkQA
Github user SparkQA commented on the issue:

https://github.com/apache/spark/pull/15596
  
**[Test build #67371 has 
finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/67371/consoleFull)**
 for PR 15596 at commit 
[`3d24f79`](https://github.com/apache/spark/commit/3d24f79f2cb46b3cea80aa7c9b37d5e9653c95f1).
 * This patch **fails Spark unit tests**.
 * This patch merges cleanly.
 * This patch adds no public classes.


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



[GitHub] spark issue #15596: [SQL] Remove shuffle codes in CollectLimitExec

2016-10-21 Thread viirya
Github user viirya commented on the issue:

https://github.com/apache/spark/pull/15596
  
BTW, we can see if there is an exchange added for `CollectLimit` from 
physical plan, e.g.,

CollectLimit 1
+- Exchange SinglePartition
  +- *LocalLimit 1
 +- *HashAggregate(keys=[str#227], functions=[count(1)], 
output=[str#227, count(1)#235L])
+- Exchange hashpartitioning(str#227, 5)
   +- *HashAggregate(keys=[str#227], 
functions=[partial_count(1)], output=[str#227, count#241L])
  +- *Project [str#227]
 +- *BroadcastHashJoin [str#227], [str#233], Inner, 
BuildRight
:- *Project [_2#224 AS str#227]
:  +- *Filter isnotnull(_2#224)
: +- LocalTableScan [_1#223, _2#224]
+- BroadcastExchange 
HashedRelationBroadcastMode(List(input[0, string, true]))
   +- *Project [_2#224 AS str#233]
  +- *Filter isnotnull(_2#224)
 +- LocalTableScan [_1#223, _2#224]



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



[GitHub] spark issue #15596: [SQL] Remove shuffle codes in CollectLimitExec

2016-10-21 Thread SparkQA
Github user SparkQA commented on the issue:

https://github.com/apache/spark/pull/15596
  
**[Test build #67371 has 
started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/67371/consoleFull)**
 for PR 15596 at commit 
[`3d24f79`](https://github.com/apache/spark/commit/3d24f79f2cb46b3cea80aa7c9b37d5e9653c95f1).


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



[GitHub] spark issue #15596: [SQL] Remove shuffle codes in CollectLimitExec

2016-10-21 Thread viirya
Github user viirya commented on the issue:

https://github.com/apache/spark/pull/15596
  
cc @rxin @yhuai May you take a quick look to see if this direction is ok 
for you? Thanks!


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