From d56c97aab615b9ba7be0c99b36f27b90fad9687c Mon Sep 17 00:00:00 2001 From: Daoyuan Wang Date: Sun, 7 Jun 2015 23:30:43 -0700 Subject: [PATCH] fix bug for #6405 --- .../apache/spark/sql/catalyst/analysis/HiveTypeCoercion.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 a42ffce0d26f..a0abede7f8db 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 @@ -445,10 +445,10 @@ trait HiveTypeCoercion { e2 @ DecimalType.Expression(p2, s2)) if p1 != p2 || s1 != s2 => val resultType = DecimalType(max(p1, p2), max(s1, s2)) b.makeCopy(Array(Cast(e1, resultType), Cast(e2, resultType))) - case b @ BinaryComparison(e1 @ DecimalType.Fixed(_, _), e2) + case b @ BinaryComparison(e1 @ DecimalType.Expression(_, _), e2) if e2.dataType == DecimalType.Unlimited => b.makeCopy(Array(Cast(e1, DecimalType.Unlimited), e2)) - case b @ BinaryComparison(e1, e2 @ DecimalType.Fixed(_, _)) + case b @ BinaryComparison(e1, e2 @ DecimalType.Expression(_, _)) if e1.dataType == DecimalType.Unlimited => b.makeCopy(Array(e1, Cast(e2, DecimalType.Unlimited)))