aws / aws/amazon-redshift-python-driver

fetch_dataframe returning float types incorrectly

Aberta
#259 0 comentários 1 reação 0 responsáveis Ver no GitHub
Linguagem predominante
Python
Estrelas
220
Forks
86
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

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](https://github.com/user-attachments/assets/b9c2b3f6-8de3-40f0-8a17-e6d08a9c86f2)
![Image](https://github.com/user-attachments/assets/8893e18e-d4e9-4a3d-b610-122c268e4b49)

Guia de contribuição

Abrir o guia de contribuição

Direção de pesquisa

Comece rastreando o método fetch_dataframe e reproduzindo os valores relatados para REAL e DOUBLE PRECISION no Redshift. Compare os valores retornados com a precisão da entrada e o comportamento existente do conector; considera-se concluído quando os valores decimais esperados são retornados sem dígitos de ponto flutuante indesejados, com um teste de regressão cobrindo ambos os tipos.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
aws, python
Domínio
databases
Tipo de issue
Bug
Dificuldade
3/5
Tempo estimado
1-2 dias
Status de atividade
Estagnada
Clareza
Precisa de esclarecimento
Facilidade para iniciantes
38/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.