Github user gatorsmile commented on a diff in the pull request:
https://github.com/apache/spark/pull/20914#discussion_r178321159
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/PropagateEmptyRelation.scala
---
@@ -43,7 +43,7 @@ object PropagateEmptyRelation extends Rule[LogicalPlan]
with PredicateHelper {
// Construct a project list from plan's output, while the value is
always NULL.
private def nullValueProjectList(plan: LogicalPlan):
Seq[NamedExpression] =
- plan.output.map{ a => Alias(Literal(null), a.name)(a.exprId) }
+ plan.output.map{ a => Alias(Cast(Literal(null), a.dataType),
a.name)(a.exprId) }
--- End diff --
Please use CastSupport.cast
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]