b-r-oleary
b-r-oleary

Reputation: 166

Does Redshift support the IEEE 754 floating point numbers?

Recently I encountered an overflow error when attempting to load data from a DOUBLE PRECISION column in a postgres database to a DOUBLE PRECISION column into AWS Redshift:

Overflow, 2.8079240261080252e-316 (Double valid range 2.225074e-308 to 1.797693e+308)

Based on the wikipedia entry for double precision floating point numbers it seems like the range of numbers supported by redshift includes "normal doubles", but excludes "subnormal doubles".

As an additional check, I attempted to retrieve the smallest subnormal double, which was successful in postgres, but resulted in an overflow error in redshift:

SELECT '4.94065645841246544e-324'::DOUBLE PRECISION;

Based on this observed behavior, can we conclude that Redshift does not properly implement the IEEE 754 standard for floating point numbers? Does anyone have any relevant experience interoperating between systems that do and do not support subnormal numbers?

Upvotes: 1

Views: 431

Answers (0)

Related Questions