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

Support casting from DataType::Utf8 to DataType::Boolean #1740

Closed
MazterQyou opened this issue May 24, 2022 · 0 comments · Fixed by #1738
Closed

Support casting from DataType::Utf8 to DataType::Boolean #1740

MazterQyou opened this issue May 24, 2022 · 0 comments · Fixed by #1738
Labels
arrow Changes to the arrow crate enhancement Any new improvement worthy of a entry in the changelog

Comments

@MazterQyou
Copy link
Contributor

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
Casting strings to bools is more or less trivial and is useful for comparison between values of those two types.

Describe the solution you'd like
It makes sense to implement Utf8 to Boolean cast with respect to PostgreSQL boolean cast, accepting values of true, yes, on, 1, false, no, off, 0 as valid boolish strings, as well as their unique prefixes, ignoring the case and whitespace (again, following PostgreSQL convention).

Describe alternatives you've considered
N/A

Additional context
N/A

@MazterQyou MazterQyou added the enhancement Any new improvement worthy of a entry in the changelog label May 24, 2022
@alamb alamb added the arrow Changes to the arrow crate label Jun 9, 2022
@alamb alamb changed the title Allow casting from DataType::Utf8 to DataType::Boolean Support casting from DataType::Utf8 to DataType::Boolean Jun 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate enhancement Any new improvement worthy of a entry in the changelog
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants