-
Notifications
You must be signed in to change notification settings - Fork 4k
ARROW-8918: [C++][Python] Implement cast metafunction to allow use of "cast" with CallFunction, use in Python #7258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
4f8ebe6 to
279db23
Compare
|
I had copy-pasted the original docstring for |
|
Fixed. I also moved the cast Python wrapper to compute.py so it doesn't need to be compiled |
|
I missed that there was a partial wrapper for CastOptions used in _dataset.pyx, fixing that now |
|
I just moved the compute wrappers to compute.pxi (so they are part of |
|
Could someone review this? |
|
Is there a specific reason for moving compute into |
|
For the rest looks good to me! |
|
@jorisvandenbossche I can try moving it back, I was concerned about having to |
|
What would need to be cimported in lib.pyx? I think in the Array and Table classes etc, for the computational methods, you do the (now, I don't know how important this is, it was just a throught) |
…ager casts, use in Python Typos Rebase and fix bugs Review comments. Move cast to compute.py Consolidate _compute.pyx, compute.pxi and CastOptions wrapping decruft Move compute-related code to _compute.pyx/_compute.pxd
|
I added a _compute.pxd, no big deal. Will merge this once the build passes |
|
Merging. The ARM failure (not sure what went wrong?) does not need to block |
This provides the
CAST(data AS target_type)SQL idiom. The target_type is provided via CastOptions (FWIW I believe this is the most correct approach for handling the target_type). As a result we no longer need to maintain separate binding boilerplate in Python for Array vs. ChunkedArray