Java – Avoid exponential notation in Hadoop pigs

Avoid exponential notation in Hadoop pigs… here is a solution to the problem.

Avoid exponential notation in Hadoop pigs

I want to avoid exponential notation in Hadoop Pig.
For example.

My output is this

123,123123,3.8284426969382444E14

How can I avoid using exponential symbols?

Solution

You can use BigDecimal.toPlainString() :

Returns a string representation of this BigDecimal without an exponent field.

Example:

BigDecimal number = new BigDecimal("3.8284426969382444E14");
System.out.println(number.toPlainString());

Output:

382844269693824.44

Related Problems and Solutions