Skip to content

Unblock python smoke case and fix numpy int convert#1104

Merged
yokofly merged 3 commits intodevelopfrom
unblock-python-smoke-case-and-fix-numpy-int-convert
Feb 4, 2026
Merged

Unblock python smoke case and fix numpy int convert#1104
yokofly merged 3 commits intodevelopfrom
unblock-python-smoke-case-and-fix-numpy-int-convert

Conversation

@yokofly
Copy link
Copy Markdown
Collaborator

@yokofly yokofly commented Feb 4, 2026

Please write user-readable short description of the changes:

  • Problem
    • Python UDF/UDA code that returns numpy scalar ints (e.g. numpy.int64) fails at the Python→Proton boundary with “Failed to convert Python object to long”.
  • What changed
    • src/CPython/ConvertDatatypes.cpp:336:
      • Keep fast-path for PyLong.
      • For non-PyLong integer-like objects, coerce via PyNumber_Index() and then convert, so numpy scalars (and other index providers) work.
      • Improve error reporting by surfacing Python exception text when coercion fails.
    • src/CPython/tests/gtest_data_convert.cpp:163:
      • Add regression tests for inserting numpy.int64(15) into int64 and numpy.uint64(15) into uint64.

@yokofly yokofly merged commit 0307253 into develop Feb 4, 2026
7 of 11 checks passed
@yokofly yokofly deleted the unblock-python-smoke-case-and-fix-numpy-int-convert branch February 4, 2026 03:44
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.

1 participant