Skip to content

Athena read_sql_query with pyarrow backend trims time in timestamp #2874

Closed
@Aleksei-Poliakov

Description

@Aleksei-Poliakov

Describe the bug

Running this query:

wr.athena.read_sql_query("SELECT TIMESTAMP '2024-06-24 9:30:51'", dtype_backend='pyarrow')

yields 2024-06-24 instead of 2024-06-24 09:30:51. It seems like timestamp from Athena is mapped to date64[pyarrow] instead of timestamp[ns][pyarrow]

How to Reproduce

wr.athena.read_sql_query("SELECT TIMESTAMP '2024-06-24 9:30:51'", dtype_backend='pyarrow')

Expected behavior

The result should be similar to running with numpy backend:

wr.athena.read_sql_query("SELECT TIMESTAMP '2024-06-24 9:30:51'")

which correctly gives back 2024-06-24 09:30:51

Your project

No response

Screenshots

No response

OS

Linux

Python version

3.12

AWS SDK for pandas version

3.8.0

Additional context

No response

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions