Skip to content

BUG: read_sql reading duplicate tz aware columns #53311

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

Merged
merged 7 commits into from
May 31, 2023

Conversation

mroeschke
Copy link
Member

@mroeschke mroeschke added IO SQL to_sql, read_sql, read_sql_query Timezones Timezone data dtype labels May 19, 2023
@mroeschke mroeschke added this to the 2.1 milestone May 19, 2023
@pytest.mark.parametrize("conn", postgresql_connectable)
def test_self_join_date_columns(conn, request):
# GH 44421
conn = request.getfixturevalue(conn)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add this to the Postgres class? The classes are skipped when no db is detected

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure moved (though I think eventually we should move these classes to the functional fixture instead of the class based ones)

@mroeschke
Copy link
Member Author

Going to merge, but happy to follow up if needed

@mroeschke mroeschke merged commit 05ee112 into pandas-dev:main May 31, 2023
@mroeschke mroeschke deleted the bug/sql/dup_tz_col branch May 31, 2023 17:18
topper-123 pushed a commit to topper-123/pandas that referenced this pull request Jun 5, 2023
* BUG: read_sql reading duplicate tz aware columns

* Use isetitem

* Move to postgres class
Daquisu pushed a commit to Daquisu/pandas that referenced this pull request Jul 8, 2023
* BUG: read_sql reading duplicate tz aware columns

* Use isetitem

* Move to postgres class
@the21st
Copy link

the21st commented Feb 13, 2024

@mroeschke thanks! Any chance this bugfix could be backported to pandas 2.0.x too?

@simonjayhawkins
Copy link
Member

Typically the backport branch is only maintained until the following minor release or just after. Now that the latest version is 2.2.0, it is extremely unlikely that any further patch releases will happen in the 2.0.x branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO SQL to_sql, read_sql, read_sql_query Timezones Timezone data dtype
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: pd.read_sql() fails on SELECT * self join when handling date columns
4 participants