Skip to content

Commit

Permalink
Add udt support to TypeCoercion as well
Browse files Browse the repository at this point in the history
  • Loading branch information
Fokko committed Dec 2, 2019
1 parent 7aaaee2 commit a33ed0b
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -103,6 +103,12 @@ object TypeCoercion {
case (_: TimestampType, _: DateType) | (_: DateType, _: TimestampType) =>
Some(TimestampType)

case (t: DataType, udt: UserDefinedType[_]) if t == udt.sqlType =>
Some(t)

case (udt: UserDefinedType[_], t: DataType) if t == udt.sqlType =>
Some(t)

case (t1, t2) => findTypeForComplex(t1, t2, findTightestCommonType)
}

Expand Down

0 comments on commit a33ed0b

Please sign in to comment.