wesm opened a new pull request #7278:
URL: https://github.com/apache/arrow/pull/7278
There's some new code generation machinery here (that will be worth ongoing
iteration) but the relevant implementation / "developer UX" is what's in
string_scalar_ascii.cc, take a look.
```
In [1]: import pyarrow as pa; import pyarrow.compute as pc
In [2]: arr = pa.array(['aaa', 'bbbbbb', None, ''])
In [3]: pc.ascii_upper(arr)
Out[3]:
<pyarrow.lib.StringArray object at 0x7f7044003e50>
[
"AAA",
"BBBBBB",
null,
""
]
In [4]: pc.ascii_length(arr)
Out[4]:
<pyarrow.lib.Int32Array object at 0x7f7044003910>
[
3,
6,
null,
0
]
```
int64 offsets are respected with LargeString
```
In [5]: arr = pa.array(['aaa', 'bbbbbb', None, ''], type='large_utf8')
In [6]: pc.ascii_length(arr)
Out[6]:
<pyarrow.lib.Int64Array object at 0x7f703c74cbb0>
[
3,
6,
null,
0
]
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]