I am trying to convert hexadecimal FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF to decimal in snowflake.
expected output is 340282366920938463463374607431768211455. (it holds 39 digits)
when i tried using the snowflake java function like below, the output is in exponential format.
The problem is snowflake number data type supports 38 digits.
create or replace function js_hextoint (s string)
returns double language JAVASCRIPT
as
'if (S !== null)
{
output = parseInt(S, 16);
}
return output
output is -3.40282366920938e+38
but the expected output is 340282366920938463463374607431768211455.
how can I get the expected decimal conversion?
