Skip to content

FIX-#7712: Promote dtypes when concat mixes empty and non-empty frames - #7717

Closed
Eryx-Z wants to merge 1 commit into
modin-project:mainfrom
Eryx-Z:fix/concat-empty-column-dtype-promotion
Closed

Eryx-Z wants to merge 1 commit into
modin-project:mainfrom
Eryx-Z:fix/concat-empty-column-dtype-promotion

Conversation

@Eryx-Z

@Eryx-Z Eryx-Z commented Oct 16, 2026

Copy link
Copy Markdown

What do these changes do?

When concatenating along rows, empty frames contribute to the merged dtype cache via ModinDtypes.concat but are filtered out of partition concat. The cached schema then disagrees with the materialised data (e.g. empty float64 + int64 reported as float64 while _to_pandas() stayed int64).

Cast remaining partitions to the merged dtypes so materialised data matches the cache and pandas.

Empty frames contribute to the merged dtype cache but are filtered out of
partition concat. Cast remaining partitions so materialised data matches
the cached schema (e.g. empty float64 + int64 -> float64), matching pandas.

Signed-off-by: Eryx-Z <257642323+Eryx-Z@users.noreply.github.com>
@Eryx-Z
Eryx-Z force-pushed the fix/concat-empty-column-dtype-promotion branch from 762c7f1 to 12a0ea7 Compare October 16, 2026 20:31
@Eryx-Z

Eryx-Z commented Oct 20, 2026

Copy link
Copy Markdown
Author

Closing for now.

@Eryx-Z Eryx-Z closed this Oct 20, 2026
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.

concat of an empty and a non-empty frame materializes int64 where pandas gives float64, and modin's own .dtypes disagrees

2 participants