You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is an "easy" problem where Capitalize(None) -> "". for sqlalchemy backends. That's just a simple bug.
Trickier are deciding on semantics:
should we capitalize every "word", or just the first letter of the string? postgres and polars does the first, the current sqlalchemy implementation does the second. Not sure about other backends.
what is our definition of a word boundary? postgres says "words are defined as sequences of alphanumeric characters separated by non-alphanumeric characters." polars splits on whitespacesource Oh boy this won't be fun.
I would say we should punt on the hard token thing, and use the same semantics python's str.capitalize(), with first letter upper, the rest lower. Then we just need to bring all the backends in line with this.
Later, we can add a .title() or similar to do the the per-token capitalization.
What version of ibis are you using?
main
What backend(s) are you using, if any?
No response
Relevant log output
No response
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
…nds (#8270)
Fixes#8271.
BREAKING CHANGE: Backends that previously used initcap (analogous to str.title) to implement StringValue.capitalize() will produce different results when the input string contains multiple words (a word's definition being backend-specific).
…nds (ibis-project#8270)
Fixesibis-project#8271.
BREAKING CHANGE: Backends that previously used initcap (analogous to str.title) to implement StringValue.capitalize() will produce different results when the input string contains multiple words (a word's definition being backend-specific).
What happened?
See failing tests in #8270
Several issues:
Trickier are deciding on semantics:
I would say we should punt on the hard token thing, and use the same semantics python's str.capitalize(), with first letter upper, the rest lower. Then we just need to bring all the backends in line with this.
Later, we can add a
.title()or similar to do the the per-token capitalization.What version of ibis are you using?
main
What backend(s) are you using, if any?
No response
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: