Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fetch_dataframe returning float types incorrectly #259

Open
JasonLeong81 opened this issue Mar 20, 2025 · 0 comments
Open

fetch_dataframe returning float types incorrectly #259

JasonLeong81 opened this issue Mar 20, 2025 · 0 comments

Comments

@JasonLeong81
Copy link

The fetch_dataframe method provided by the Redshift connector appears to return more decimal places than expected. For example, 0.074 becomes 0.07400000095367, likely due to how Redshift stores and retrieves floating-point or decimal values with higher precision than originally intended.

The first image shows what was returned by the fetch_dataframe method and although the revenue growth column is exactly what we expected (exact user inputs without more decimal places), when we actually take a look at one of the values specifically (second one in this case), we get the value in the second image. This suggests that fetch_dataframe is already returning extra decimal places but just not viewable when printing the whole dataframe. For now, we have identified that this is a problem for the datatypes REAL and DOUBLE PRECISION on the redshift connector.
Image
Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant