Skip to content Skip to sidebar Skip to footer

How To Compare Two Columns With Different Data Type Groups

This is an extension of a question I posed yesterday: How to handle potential data loss when performing comparisons across data types in different groups In HIVE, is it possible to

Solution 1:

Cast implicitly is good idea:

CASEWHEN  Column1 <=>cast(Column2 asbigint) THEN0ELSE1END

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

Post a Comment for "How To Compare Two Columns With Different Data Type Groups"