Skip to content

Handle pandas str dtype in COPY#27

Merged
adsharma merged 1 commit into
mainfrom
fix/pandas-str-dtype-copy
Jun 4, 2026
Merged

Handle pandas str dtype in COPY#27
adsharma merged 1 commit into
mainfrom
fix/pandas-str-dtype-copy

Conversation

@adsharma

@adsharma adsharma commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Handle pandas 3 str dtype columns in the native pandas COPY scan path.

Closes LadybugDB/ladybug#566.

Root cause

Pandas 3 can infer ordinary text columns as str, represented as StringDtype(storage='python', na_value=nan). The native numpy dtype converter accepted object and string, but not str, so dataframe scans reached UNREACHABLE_CODE before COPY could bind the dataframe columns.

Changes

  • Treat pandas str dtype the same as existing object and string text columns.
  • Add a regression test for COPY T FROM df with string columns, an integer column, and a nullable double column.

@adsharma adsharma marked this pull request as ready for review June 4, 2026 16:01
@adsharma adsharma merged commit babcafc into main Jun 4, 2026
2 checks passed
@adsharma adsharma deleted the fix/pandas-str-dtype-copy branch June 4, 2026 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Linux/Python 3.13: DataFrame/NumPy path crashes with numpy_type.cpp UNREACHABLE_CODE

1 participant