Commit 65482ac
PERF: avoid NumPy fallback in ArrowStringArray._from_sequence for integer types
When converting ArrowExtensionArray to string dtype, use PyArrow's native
pc.cast() for integer and string types where the string representation
matches Python's str(). This avoids unnecessary conversion through NumPy.
Float and boolean types still fall back to lib.ensure_string_array because
PyArrow's string representation differs from Python's str():
- Float: 1.0 -> "1" (PyArrow) vs "1.0" (Python)
- Bool: True -> "true" (PyArrow) vs "True" (Python)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <[email protected]>1 parent 7b51d3a commit 65482ac
1 file changed
+17
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
213 | 230 | | |
214 | 231 | | |
215 | 232 | | |
| |||
0 commit comments