-
Notifications
You must be signed in to change notification settings - Fork 449
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
SNOW-846438: Getting 0 rows from a TIMESTAMP_TZ column gives timezone-less pandas dtype #1612
Comments
thanks for reaching out, I can reproduce the issue. |
I cannot even reproduce the correct behavior... def test_timestamp(conn_cnx):
with conn_cnx() as conn, conn.cursor() as cur:
df = cur.execute(
"SELECT '2021-01-01 00:00:00'::timestamp_tz AS TIME",
_statement_params={
"TIMEZONE": "America/Los_Angeles",
},
).fetch_pandas_all()
... I get |
Okay, so the following test seems to work:
|
This will require a back-end change it seems unfortunately, so it will take us a while to fix.
For anyone trying to repro this, I set a breakpoint at this line. Note that the |
That being said I'm not too sure how this is going to work. As far as I understand in |
Python version
Python 3.8.16 (default, Mar 1 2023, 21:19:10) [Clang 14.0.6 ]
Operating system and processor architecture
macOS-10.16-x86_64-i386-64bit
Installed packages
What did you do?
What did you expect to see?
This experience doesn't match the pandas experience, where filtering out all the records from a column should preserve the column's dtype. I want to get
datetime64[ns, America/Los_Angeles]
(my session time zone) even when my query returns non records.Can you set logging to DEBUG and collect the logs?
No response
The text was updated successfully, but these errors were encountered: