ARROW-8918: [C++][Python] Implement cast metafunction to allow use of "cast" with CallFunction, use in Python#7258
ARROW-8918: [C++][Python] Implement cast metafunction to allow use of "cast" with CallFunction, use in Python#7258wesm wants to merge 1 commit intoapache:masterfrom
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