You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Joris Van den Bossche (Jira)" <ji...@apache.org> on 2021/02/22 11:13:00 UTC

[jira] [Commented] (ARROW-11693) [C++] Add string length kernel

    [ https://issues.apache.org/jira/browse/ARROW-11693?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17288321#comment-17288321 ] 

Joris Van den Bossche commented on ARROW-11693:
-----------------------------------------------

The {{binary_length}} was originally added as {{ascii_length}} in https://github.com/apache/arrow/pull/7278/, as a simple (example) kernel, and indeed not yet meant to specifically handle unicode logical string size, I think. Having a proper UTF8 string length kernel would indeed be good (also needed for pandas' string methods).

> [C++] Add string length kernel
> ------------------------------
>
>                 Key: ARROW-11693
>                 URL: https://issues.apache.org/jira/browse/ARROW-11693
>             Project: Apache Arrow
>          Issue Type: New Feature
>          Components: C++
>            Reporter: Neal Richardson
>            Priority: Major
>             Fix For: 4.0.0
>
>
> We have "binary_length" but that doesn't handle UTF-8 the way we need for this. Example (from R):
> {code}
> > string <- "áéíóú"
> > nchar(string)
> [1] 5
> > arrow:::call_function("binary_length", Scalar$create(string))
> Scalar
> 10
> {code}
> cc [~maartenbreddels] [~apitrou] [~jorisvandenbossche]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)