2 years ago

#65513

test-img

Developer KE

Hive Double and Decimal value incorrect format

I am migrating the sql statement greenplum to HiveSQL supported with pyspark scripts. we are encounter the issues if the double or decimal value, the value getting changed while doing the sum of the double or decimal value.

source data output as below like.

+------------------------+
|        test_amount|
+------------------------+
| 6.987713783438851E8    |
| 1.42712398248124E10    |
| 6.808514167337805E8    |
| 1.5215888908771296E10  |

actual greenplum provide the output while doing the sum of the amount value as below like,

2022-01-16  2   14970011203.1514433
2022-01-17  2   15896793850.6107666

GP sum out put

+-------------+------+------------------------+
|     _c0     | _c1  |          _c2           |
+-------------+------+------------------------+
| 2022-01-16  | 2    | 1.4970011203156286E10  |
| 2022-01-17  | 2    | 1.5896740325505075E10  |
+-------------+------+------------------------+

please help us.

pyspark

hive

hiveql

greenplum

0 Answers

Your Answer

Accepted video resources