hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tucker, Matt" <Matt.Tuc...@disney.com>
Subject Hex and UnHex UDFs
Date Fri, 11 May 2012 15:46:58 GMT
I'm trying to convert a base-16 string to a base-10 bigint, but I'm getting strange results
using unhex().

When I convert 2819892256088064694 with hex(), I get "27224511050102B6".  Converting it back
using unhex(), I get strange output ('"E).  Casting the output to bigint does not resolve
the issue.

For comparison, java.math.BigInteger("27224511050102B6", 16) returns the correct base-10 value.

Is there a way to use the reflect() UDF with the BigInteger constructor? Is this unhex() output
considered correct?

Thanks

Matt

Mime
View raw message