Skip to content
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

[Python] Wrap RunEndEncodedScalar values to make the accessible in pyarrow #34686

Closed
Tracked by #34701
felipecrv opened this issue Mar 22, 2023 · 0 comments · Fixed by #34924
Closed
Tracked by #34701

[Python] Wrap RunEndEncodedScalar values to make the accessible in pyarrow #34686

felipecrv opened this issue Mar 22, 2023 · 0 comments · Fixed by #34924

Comments

@felipecrv
Copy link
Contributor

Describe the enhancement requested

This problem was found by @jorisvandenbossche in a PR review:

#34570 (review)

In [15]: run_ends = [3, 5, 10, 19]
    ...: values = [1, 2, 1, 3]
    ...: ree_array = pa.RunEndEncodedArray.from_arrays(run_ends, values)

In [16]: ree_array[0]
...
NotImplementedError: Wrapping scalar of type run_end_encoded<run_ends: int64, values: int64>

Component(s)

Python

@jorisvandenbossche jorisvandenbossche changed the title [Python][C++] Wrap RunEndEncodedScalar values to make the accessible in pyarrow [Python] Wrap RunEndEncodedScalar values to make the accessible in pyarrow Mar 23, 2023
@jorisvandenbossche jorisvandenbossche added this to the 12.0.0 milestone Mar 23, 2023
jorisvandenbossche added a commit to jorisvandenbossche/arrow that referenced this issue Apr 6, 2023
jorisvandenbossche added a commit that referenced this issue Apr 6, 2023
### Rationale for this change

Follow-up on #34570 (exposing the new RunEndEncoded array and type in pyarrow) to also add the scalar class.

### Are there any user-facing changes?

The example from the issue now works:

```
In [15]: run_ends = [3, 5, 10, 19]
    ...: values = [1, 2, 1, 3]
    ...: ree_array = pa.RunEndEncodedArray.from_arrays(run_ends, values)

In [16]: ree_array[0]
Out[16]: <pyarrow.RunEndEncodedScalar: 1>
```
* Closes: #34686

Authored-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
Signed-off-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
liujiacheng777 pushed a commit to LoongArch-Python/arrow that referenced this issue May 11, 2023
### Rationale for this change

Follow-up on apache#34570 (exposing the new RunEndEncoded array and type in pyarrow) to also add the scalar class.

### Are there any user-facing changes?

The example from the issue now works:

```
In [15]: run_ends = [3, 5, 10, 19]
    ...: values = [1, 2, 1, 3]
    ...: ree_array = pa.RunEndEncodedArray.from_arrays(run_ends, values)

In [16]: ree_array[0]
Out[16]: <pyarrow.RunEndEncodedScalar: 1>
```
* Closes: apache#34686

Authored-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
Signed-off-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
ArgusLi pushed a commit to Bit-Quill/arrow that referenced this issue May 15, 2023
### Rationale for this change

Follow-up on apache#34570 (exposing the new RunEndEncoded array and type in pyarrow) to also add the scalar class.

### Are there any user-facing changes?

The example from the issue now works:

```
In [15]: run_ends = [3, 5, 10, 19]
    ...: values = [1, 2, 1, 3]
    ...: ree_array = pa.RunEndEncodedArray.from_arrays(run_ends, values)

In [16]: ree_array[0]
Out[16]: <pyarrow.RunEndEncodedScalar: 1>
```
* Closes: apache#34686

Authored-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
Signed-off-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
rtpsw pushed a commit to rtpsw/arrow that referenced this issue May 16, 2023
### Rationale for this change

Follow-up on apache#34570 (exposing the new RunEndEncoded array and type in pyarrow) to also add the scalar class.

### Are there any user-facing changes?

The example from the issue now works:

```
In [15]: run_ends = [3, 5, 10, 19]
    ...: values = [1, 2, 1, 3]
    ...: ree_array = pa.RunEndEncodedArray.from_arrays(run_ends, values)

In [16]: ree_array[0]
Out[16]: <pyarrow.RunEndEncodedScalar: 1>
```
* Closes: apache#34686

Authored-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
Signed-off-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants