Github user srowen commented on a diff in the pull request:
https://github.com/apache/spark/pull/14573#discussion_r74239358
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/SparkPlan.scala ---
@@ -333,15 +333,14 @@ abstract class SparkPlan extends QueryPlan[SparkPlan]
with Logging with Serializ
// If we didn't find any rows after the first iteration, just try
all partitions next.
// Otherwise, interpolate the number of partitions we need to try,
but overestimate it
// by 50%.
- if (buf.size == 0) {
- numPartsToTry = totalParts - 1
+ if (buf.isEmpty) {
--- End diff --
Yeah, this is actually taken from `RDD.take()`. Your approach is closer to
what that does, but I think we should actually make them operate as similarly
as possible unless there's a reason not to. Could you compare and sync them up
further?
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]