Skip to content

Commit

Permalink
replace IntegerType with NumericType
Browse files Browse the repository at this point in the history
  • Loading branch information
stanzhai committed Aug 19, 2017
1 parent 627116a commit 1647447
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,10 @@ object TypeCoercion {
case (DateType, TimestampType) => Some(StringType)
case (StringType, NullType) => Some(StringType)
case (NullType, StringType) => Some(StringType)
case (l: StringType, r: AtomicType) if r != StringType =>
if (r == IntegerType || r == LongType) Some(DoubleType) else Some(r)
case (l: AtomicType, r: StringType) if l != StringType =>
if (l == IntegerType || l == LongType) Some(DoubleType) else Some(l)
case (StringType, r: NumericType) => Some(DoubleType)
case (l: NumericType, StringType) => Some(DoubleType)
case (l: StringType, r: AtomicType) if r != StringType => Some(r)
case (l: AtomicType, r: StringType) if l != StringType => Some(l)
case (l, r) => None
}

Expand Down

0 comments on commit 1647447

Please sign in to comment.