hive> select cast(12345678910.231 as double);
Time taken: 0.164 seconds, Fetched: 1 row(s)
but need the value 12345678910.231 stored as double.
select cast(cast(12345678910.231 as double) as double); also wont work and is similar as the above.
I dont need the output format to be change using the printf() UDF, rather i need the value to be stored and retrieved while querying as a non exponential form.
The value that you are receiving is as expected, this sample java code show the info. If you are wanting to get the exact value as an output, you should convert that value to string.
public class DoubleDemo
public static void main(String args)
double d = 12345678910.231;
System.out.println("Value of d = " + d);
You can cast as decimal and solve the issue as shown below.
ROUND(CAST(1.750646377E7 AS DECIMAL(38,10)),2);
Thanks & regards,