How to compare two columns with different data type groups How to compare two columns with different data type groups hadoop hadoop

How to compare two columns with different data type groups


Cast implicitly is good idea:

CASE     WHEN  Column1 <=> cast(Column2 as bigint) THEN 0     ELSE 1END

If not possible to cast, the result of cast is NULL.