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

Use upstream DataType::from_str in arrow-cast #11254

Merged
merged 5 commits into from
Aug 1, 2024

Conversation

alamb
Copy link
Contributor

@alamb alamb commented Jul 3, 2024

Draft until apache/arrow-rs#5994 is released (likely 52.2.0)

Which issue does this PR close?

N/A

Rationale for this change

@samuelcolvin ported this code upstream to arrow-rs in apache/arrow-rs#5994 so let's use that code

What changes are included in this PR?

Remove DataType parsing code in DataFusion and use upstreamed copy

Are these changes tested?

Are there any user-facing changes?

@github-actions github-actions bot added the logical-expr Logical plan and expressions label Jul 3, 2024
}
}
}
val.parse().map_err(|e| match e {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Simply use the upstream impl now

@alamb alamb force-pushed the alamb/remove_datatype_parse branch from e52703f to 54f6587 Compare July 29, 2024 10:44
@github-actions github-actions bot removed the logical-expr Logical plan and expressions label Jul 29, 2024
@alamb
Copy link
Contributor Author

alamb commented Jul 29, 2024

I also double checked that it has support for BinaryView and Utf8View: https://github.com/apache/arrow-rs/blob/80ed7128510bac114c6feec08c34ef3beed3a44a/arrow-schema/src/datatype_parse.rs#L443-L445

@alamb alamb marked this pull request as ready for review July 29, 2024 10:55
@alamb alamb changed the title Use upstream DataType::from_str in arrow-cast Use upstream DataType::from_str in arrow-cast Jul 29, 2024
@alamb alamb requested a review from Dandandan July 30, 2024 18:59
Copy link
Contributor

@comphead comphead left a comment

Choose a reason for hiding this comment

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

lgtm thanks @alamb
awesome clean up. errors macros can be added later

@alamb
Copy link
Contributor Author

alamb commented Aug 1, 2024

lgtm thanks @alamb awesome clean up. errors macros can be added later

I was messing around with the PR anyways so I made the changes to use error macros.

Thanks again @comphead

@alamb alamb merged commit cf98d94 into apache:main Aug 1, 2024
24 checks passed
@alamb alamb deleted the alamb/remove_datatype_parse branch August 1, 2024 11:56
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.

2 participants