Netflix / iceberg

Iceberg is a table format for large, slow-moving tabular data
Apache License 2.0
476 stars 59 forks source link

Restrict decimal precision to 38 digits. #7

Closed rdblue closed 6 years ago

rdblue commented 6 years ago

From @omalley:

Because implementing efficient operations on arbitrary length numbers is hard. BigInteger is really slow. Most C++ compilers now have __int128_t to directly implement 128 bits integers. Implementing a reasonable Int128 in Java is a pain, but doable.

All databases have limits on precision. Hive, Spark SQL, and SQL Server have a 38 digit limit. Oracle uses a 31 digit limit. MySql has a 65 digit limit. To me 38 is more than any application that I have written (except one!) needs and has a pretty straightforward implementation.

rdblue commented 6 years ago

Fixed in a5cb45541a663e85ebc6c102073c33b52465b32d.