Skip to content

Implement single point for scalar conversion from python objects#7

Open
timsaucer wants to merge 2 commits intokosiew:typeconversion-issue-1339from
timsaucer:unify-scalar-conversion
Open

Implement single point for scalar conversion from python objects#7
timsaucer wants to merge 2 commits intokosiew:typeconversion-issue-1339from
timsaucer:unify-scalar-conversion

Conversation

@timsaucer
Copy link

This PR is a proposal for adding a single point where we do python object to scalar value conversion. It attempts to handle three known arrow libraries: pyarrow, nanoarrow, and arro3. It includes trying to convert any library that produces a pycapsule arrow interface. There is a fallback to take any regular Python object and try turning it into a pyarrow scalar value and then importing it.

@timsaucer
Copy link
Author

@kosiew I tried taking a stab at moving all of the scalar value conversion to a single point and supporting all of the libraries that I know about. I didn't add unit tests yet, though.

@timsaucer timsaucer marked this pull request as draft February 6, 2026 14:28
@timsaucer
Copy link
Author

moved to draft because I realized with this code I can simplify part of literal() and remove some of our dependency on pyarrow

@timsaucer timsaucer marked this pull request as ready for review February 6, 2026 16:27
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