Skip to content

fix: avoid panic in create_dataframe when partitions are empty - #1860

Open
mesejo wants to merge 1 commit into
apache:mainfrom
mesejo:fix/avoid_panic_on_emtpy_partitions
Open

mesejo wants to merge 1 commit into
apache:mainfrom
mesejo:fix/avoid_panic_on_emtpy_partitions

Conversation

@mesejo

@mesejo mesejo commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

None

Rationale for this change

Infer the schema from the first non-empty partition, and raise ValueError when every partition is empty instead of panicking.

What changes are included in this PR?

Minor code changes

Are there any user-facing changes?

Yes, but the changes are minor; now the users receive a ValueError instead of a panic. This affects other methods that depend on create_dataframe: from_arrow, from_pylist, etc.

Infer the schema from the first non-empty partition, and raise
ValueError when every partition is empty instead of panicking.
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.

1 participant