Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-12275][SQL] No plan for BroadcastHint in some condition #10265

Closed
wants to merge 2 commits into from

Conversation

yucai
Copy link
Contributor

@yucai yucai commented Dec 11, 2015

When SparkStrategies.BasicOperators's "case BroadcastHint(child) => apply(child)" is hit, it only recursively invokes BasicOperators.apply with this "child". It makes many strategies have no change to process this plan, which probably leads to "No plan" issue, so we use planLater to go through all strategies.

https://issues.apache.org/jira/browse/SPARK-12275

@zzcclp
Copy link
Contributor

zzcclp commented Dec 11, 2015

Hi, @yucai , my code is executed successfully with this pr. It's great.

@yucai
Copy link
Contributor Author

yucai commented Dec 11, 2015

@zzcclp Good to know :).

@chenghao-intel
Copy link
Contributor

LGTM
cc/ @yhuai

@andrewor14
Copy link
Contributor

ok to test. @yhuai can you verify?

@SparkQA
Copy link

SparkQA commented Dec 11, 2015

Test build #47592 has finished for PR 10265 at commit 1b8d570.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@chenghao-intel
Copy link
Contributor

The failure seems not related to this change.

@@ -364,7 +364,7 @@ private[sql] abstract class SparkStrategies extends QueryPlanner[SparkPlan] {
case e @ EvaluatePython(udf, child, _) =>
BatchPythonEvaluation(udf, e.output, planLater(child)) :: Nil
case LogicalRDD(output, rdd) => PhysicalRDD(output, rdd, "ExistingRDD") :: Nil
case BroadcastHint(child) => apply(child)
case BroadcastHint(child) => planLater(child) :: Nil
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is quite obvious, apply method will only make the rules within the object BasicOperators applied, but the data source(Parquet) is an extended strategy defined in another object, planLater means to search the all of the strategies(including the extensions), which is make more sense. That's why it caused exception says No plan for BroadcastHint as apply(child) returns Nil.

@yucai
Copy link
Contributor Author

yucai commented Dec 13, 2015

Weird, I find no difference for org.apache.spark.sql.sources.JsonHadoopFsRelationSuite#"test all data types - TimestampType" in Jekins's test report.

And also, I tried both org.apache.spark.sql.sources.JsonHadoopFsRelationSuite and org.apache.spark.sql.DataFrameJoinSuite with the latest Spark upstream + my PR locally, no failure also.
The executed command is:

build/sbt -Pyarn -Phadoop-2.3 -Dhadoop.version=2.3.0 -Phive-thriftserver -Phive -DskipTests assembly
build/sbt -Pyarn -Phadoop-2.3 -Dhadoop.version=2.3.0 -Phive-thriftserver -Phive 'test-only org.apache.spark.sql.sources.JsonHadoopFsRelationSuite'
build/sbt -Pyarn -Phadoop-2.3 -Dhadoop.version=2.3.0 -Phive-thriftserver -Phive 'test-only org.apache.spark.sql.DataFrameJoinSuite'

What's wrong :( ?

Jekins, can you retest this please?

@yucai
Copy link
Contributor Author

yucai commented Dec 14, 2015

retest this please

@yucai
Copy link
Contributor Author

yucai commented Dec 14, 2015

@andrewor14 , @yhuai could you kindly help re-trigger testing? Much thanks!

@yhuai
Copy link
Contributor

yhuai commented Dec 14, 2015

ok to test

@yhuai
Copy link
Contributor

yhuai commented Dec 14, 2015

test this please

@yhuai
Copy link
Contributor

yhuai commented Dec 14, 2015

LGTM pending jenkins

@yhuai
Copy link
Contributor

yhuai commented Dec 14, 2015

When merge this, let's also merge it to branch 1.5, 1.6, and master.

@SparkQA
Copy link

SparkQA commented Dec 14, 2015

Test build #47642 has finished for PR 10265 at commit 1b8d570.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@yhuai
Copy link
Contributor

yhuai commented Dec 14, 2015

Thanks! Merging to 1.5, 1.6, and master.

asfgit pushed a commit that referenced this pull request Dec 14, 2015
When SparkStrategies.BasicOperators's "case BroadcastHint(child) => apply(child)" is hit, it only recursively invokes BasicOperators.apply with this "child". It makes many strategies have no change to process this plan, which probably leads to "No plan" issue, so we use planLater to go through all strategies.

https://issues.apache.org/jira/browse/SPARK-12275

Author: yucai <yucai.yu@intel.com>

Closes #10265 from yucai/broadcast_hint.

(cherry picked from commit ed87f6d)
Signed-off-by: Yin Huai <yhuai@databricks.com>
@asfgit asfgit closed this in ed87f6d Dec 14, 2015
@yhuai
Copy link
Contributor

yhuai commented Dec 14, 2015

@yucai can you create a 1.5 backport for this one? There was a conflict when I tried to merge it to branch 1.5. It will be good to have a pr for the backport and make sure all tests are good. Thanks!

@yucai
Copy link
Contributor Author

yucai commented Dec 14, 2015

@yhuai sure, I will do that ASAP.

yucai pushed a commit to yucai/spark that referenced this pull request Dec 14, 2015
…backport

backport apache#10265 to branch 1.5

When SparkStrategies.BasicOperators's "case BroadcastHint(child) => apply(child)" is hit,
it only recursively invokes BasicOperators.apply with this "child".
It makes many strategies have no change to process this plan,
which probably leads to "No plan" issue, so we use planLater to go through all strategies.

https://issues.apache.org/jira/browse/SPARK-12275
asfgit pushed a commit that referenced this pull request Dec 14, 2015
… backport

backport #10265 to branch 1.5.

When SparkStrategies.BasicOperators's "case BroadcastHint(child) => apply(child)" is hit,
it only recursively invokes BasicOperators.apply with this "child".
It makes many strategies have no change to process this plan,
which probably leads to "No plan" issue, so we use planLater to go through all strategies.

https://issues.apache.org/jira/browse/SPARK-12275

Author: yucai <yucai.yu@intel.com>

Closes #10291 from yucai/backport_1.5_no_plan_for_broadcasthint and squashes the following commits:

b09715c [yucai] [SPARK-12275][SQL] No plan for BroadcastHint in some condition - 1.5 backport
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants