Repository: spark Updated Branches: refs/heads/branch-1.4 6b9f3831a -> 457d07eaa
[SQL] [MINOR] Skip unresolved expression for InConversion Author: scwf <[email protected]> Closes #6145 from scwf/InConversion and squashes the following commits: 5c8ac6b [scwf] minir fix for InConversion (cherry picked from commit edf09ea1bd4bf7692e0085ad9c70cb1bfc8d06d8) Signed-off-by: Cheng Lian <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/457d07ea Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/457d07ea Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/457d07ea Branch: refs/heads/branch-1.4 Commit: 457d07eaa023b44b75344110508f629925eb6247 Parents: 6b9f383 Author: scwf <[email protected]> Authored: Sun May 17 15:17:11 2015 +0800 Committer: Cheng Lian <[email protected]> Committed: Mon Jun 29 13:30:47 2015 -0700 ---------------------------------------------------------------------- .../org/apache/spark/sql/catalyst/analysis/HiveTypeCoercion.scala | 3 +++ 1 file changed, 3 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/457d07ea/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/HiveTypeCoercion.scala ---------------------------------------------------------------------- diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/HiveTypeCoercion.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/HiveTypeCoercion.scala index 6d0f4a0..e62a1f9 100644 --- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/HiveTypeCoercion.scala +++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/HiveTypeCoercion.scala @@ -307,6 +307,9 @@ trait HiveTypeCoercion { */ object InConversion extends Rule[LogicalPlan] { def apply(plan: LogicalPlan): LogicalPlan = plan transformAllExpressions { + // Skip nodes who's children have not been resolved yet. + case e if !e.childrenResolved => e + case i @ In(a, b) if b.exists(_.dataType != a.dataType) => i.makeCopy(Array(a, b.map(Cast(_, a.dataType)))) } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
