Skip to content

trino-python-client returns dtype string for datetime/timestamp fields #32

Closed
@RJ3

Description

@RJ3

presto-client returns data type of string for a timestamp field.
Setup:

  • PrestoSQL 333
  • PostgreSQL 12.1
  • presto-client 0.300.0

Tested:

  1. Using the PrestoSQL JDBC driver, the field is returned as a Java timestamp.
  2. Using psycopg2 driver with SQLalchemy directly to Postgres, the field is returned as a python datetime object or pandas timestamp object.
  3. Using presto-client 0.300, the field is returned as a string.

Expectation:
The field should be returned as a python datetime object or pandas timestamp object, akin to the PostgreSQL driver.

Note:
The issue has also been reported for pyhive (no longer under current development). I have not tested PrestoDB's version to see if the other team has also worked on the topic.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions