-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-11644][SQL] Remove the option to turn off unsafe and codegen. #9618
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
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -327,8 +327,7 @@ private[sql] abstract class SparkStrategies extends QueryPlanner[SparkPlan] { | |
| * if necessary. | ||
| */ | ||
| def getSortOperator(sortExprs: Seq[SortOrder], global: Boolean, child: SparkPlan): SparkPlan = { | ||
| if (sqlContext.conf.unsafeEnabled && sqlContext.conf.codegenEnabled && | ||
| TungstenSort.supportsSchema(child.schema)) { | ||
| if (TungstenSort.supportsSchema(child.schema)) { | ||
| execution.TungstenSort(sortExprs, global, child) | ||
| } else { | ||
| execution.Sort(sortExprs, global, child) | ||
|
|
@@ -368,8 +367,7 @@ private[sql] abstract class SparkStrategies extends QueryPlanner[SparkPlan] { | |
| case logical.Project(projectList, child) => | ||
| // If unsafe mode is enabled and we support these data types in Unsafe, use the | ||
| // Tungsten project. Otherwise, use the normal project. | ||
| if (sqlContext.conf.unsafeEnabled && | ||
| UnsafeProjection.canSupport(projectList) && UnsafeProjection.canSupport(child.schema)) { | ||
| if (UnsafeProjection.canSupport(projectList) && UnsafeProjection.canSupport(child.schema)) { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. UnsafeProjection should support all the dataType now, we could also remove this (in another PR).
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yea let's do that in a separate PR. If it does support all types, we should also just remove the normal Project. |
||
| execution.TungstenProject(projectList, planLater(child)) :: Nil | ||
| } else { | ||
| execution.Project(projectList, planLater(child)) :: Nil | ||
|
|
||
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.
Update the comment
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.
done