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
{{ message }}
Repository navigation
[C++][Python] Python to Arrow array conversion sometimes ignores "safe=False" or is using unsafe instead of safe cast #36202
Describe the bug, including details regarding any error messages, version, and platform.
There are two cases where the array constructor taking the python conversion path (python_to_arrow.cc) doesn't handle the safe keyword properly.
The safe keyword is set to True by default and is ignored if passed
One example where python list is taking python_to_arrow.cc code path are Decimals (which are python objects). Here the conversion from Decimal to int does not overflow by default and one can’t turn it off with safe=False:
Another example is JSON data with nested data (list type). The conversion is taking python_to_arrow.cc code path where safe keyword is also ignored. See example in [Python] Can't ignore the overflow error. #31402.
In some cases the safe keyword is ignored and does unsafe conversions
changed the title [-][Python] Python to array conversion sometimes ignores "safe=False" or is using unsafe instead of safe cast[/-][+][Python] Python to Arrow array conversion sometimes ignores "safe=False" or is using unsafe instead of safe cast[/+]on Jun 22, 2023
changed the title [-][Python] Python to Arrow array conversion sometimes ignores "safe=False" or is using unsafe instead of safe cast[/-][+][C++][Python] Python to Arrow array conversion sometimes ignores "safe=False" or is using unsafe instead of safe cast[/+]on Apr 2, 2025
Activity
dane commentedon Jun 21, 2023
@AlenkaF I may not be the Dane you're looking for, but I can confirm this is Python. Best of luck on addressing the bug!
AlenkaF commentedon Jun 21, 2023
Oh sorry about that! :)
[-][Python] Python to array conversion sometimes ignores "safe=False" or is using unsafe instead of safe cast[/-][+][Python] Python to Arrow array conversion sometimes ignores "safe=False" or is using unsafe instead of safe cast[/+][-][Python] Python to Arrow array conversion sometimes ignores "safe=False" or is using unsafe instead of safe cast[/-][+][C++][Python] Python to Arrow array conversion sometimes ignores "safe=False" or is using unsafe instead of safe cast[/+]RyukR1 commentedon Nov 15, 2026
Hi! I'd like to work on this issue.