[SPARK-10463] [SQL] remove PromotePrecision during optimization
PromotePrecision is not necessary after HiveTypeCoercion done. Jira: https://issues.apache.org/jira/browse/SPARK-10463 Author: Daoyuan Wang <daoyuan.wang@intel.com> Closes #8621 from adrian-wang/promoterm.
This commit is contained in:
parent
60851bc7bf
commit
94139557c5
|
@ -57,7 +57,7 @@ object DefaultOptimizer extends Optimizer {
|
|||
ConstantFolding,
|
||||
LikeSimplification,
|
||||
BooleanSimplification,
|
||||
RemovePositive,
|
||||
RemoveDispensable,
|
||||
SimplifyFilters,
|
||||
SimplifyCasts,
|
||||
SimplifyCaseConversionExpressions) ::
|
||||
|
@ -784,11 +784,12 @@ object SimplifyCasts extends Rule[LogicalPlan] {
|
|||
}
|
||||
|
||||
/**
|
||||
* Removes [[UnaryPositive]] identify function
|
||||
* Removes nodes that are not necessary.
|
||||
*/
|
||||
object RemovePositive extends Rule[LogicalPlan] {
|
||||
object RemoveDispensable extends Rule[LogicalPlan] {
|
||||
def apply(plan: LogicalPlan): LogicalPlan = plan transformAllExpressions {
|
||||
case UnaryPositive(child) => child
|
||||
case PromotePrecision(child) => child
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue