-
Notifications
You must be signed in to change notification settings - Fork 28.4k
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-23140][SQL] Add DataSourceV2Strategy to Hive Session state's planner #20305
Conversation
@cloud-fan , please help to review, thanks! |
@@ -101,6 +102,7 @@ class HiveSessionStateBuilder(session: SparkSession, parentState: Option[Session | |||
override def strategies: Seq[Strategy] = { | |||
experimentalMethods.extraStrategies ++ | |||
extraPlanningStrategies ++ Seq( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we change it to super. strategies ++ Seq(HiveTableScans, Scripts)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I will change it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the ordering matters, If I put Hive related strategies in the end, some unit tests will be failed.
thanks, good catch! |
Test build #86311 has finished for PR 20305 at commit
|
LGTM |
Test build #86313 has finished for PR 20305 at commit
|
f17b44d
to
094b7eb
Compare
Test build #86318 has finished for PR 20305 at commit
|
BasicOperators | ||
) | ||
} | ||
override def strategies: Seq[Strategy] = Seq(HiveTableScans, Scripts) ++ super.strategies |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This breaks the assumption that experimentalMethods.extraStrategies
should always run first.
I think we can just do:
override def extraPlanningStrategies: Seq[Strategy] =
super.extraPlanningStrategies ++ customPlanningStrategies ++ Seq(HiveTableScans, Scripts)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, let me update it.
Test build #86326 has finished for PR 20305 at commit
|
Test build #86328 has finished for PR 20305 at commit
|
thanks, merging to master/2.3! |
…lanner ## What changes were proposed in this pull request? `DataSourceV2Strategy` is missing in `HiveSessionStateBuilder`'s planner, which will throw exception as described in [SPARK-23140](https://issues.apache.org/jira/browse/SPARK-23140). ## How was this patch tested? Manual test. Author: jerryshao <[email protected]> Closes #20305 from jerryshao/SPARK-23140. (cherry picked from commit 7a22483) Signed-off-by: Wenchen Fan <[email protected]>
What changes were proposed in this pull request?
DataSourceV2Strategy
is missing inHiveSessionStateBuilder
's planner, which will throw exception as described in SPARK-23140.How was this patch tested?
Manual test.