Skip to content
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

fix(csv)!: infer null for empty column. #4910

Merged
merged 2 commits into from
Oct 10, 2023
Merged

Conversation

kskalski
Copy link
Contributor

@kskalski kskalski commented Oct 9, 2023

Which issue does this PR close?

Closes #4903.

Rationale for this change

Correctly reflect the fact the data had no values

What changes are included in this PR?

  • inference starts with state implying Null data type, then moves to more specific types
  • csv reader can read columns with Null data type, expects it to be empty

Are there any user-facing changes?

Previously inference assumed Utf8 data type for empty column, which later on could accept non-empty values. Now Null type is inferred and thus the column won't accept any non-empty values unless user modifies schema to handle null case differently.

@github-actions github-actions bot added the arrow Changes to the arrow crate label Oct 9, 2023
@tustvold tustvold merged commit c6387c1 into apache:master Oct 10, 2023
22 checks passed
@tustvold tustvold added the api-change Changes to the arrow API label Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-change Changes to the arrow API arrow Changes to the arrow crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CSV schema inference assumes Utf8 for empty columns
2 participants