Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix bug for #6405
  • Loading branch information
adrian-wang committed Jun 8, 2015
commit d56c97aab615b9ba7be0c99b36f27b90fad9687c
Original file line number Diff line number Diff line change
Expand Up @@ -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)))

Expand Down