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

[Docs] Wrong about the struct hiding valid children values in the example #38883

Closed
stfdxv opened this issue Nov 26, 2023 · 4 comments · Fixed by #38898
Closed

[Docs] Wrong about the struct hiding valid children values in the example #38883

stfdxv opened this issue Nov 26, 2023 · 4 comments · Fixed by #38898

Comments

@stfdxv
Copy link
Contributor

stfdxv commented Nov 26, 2023

Describe the bug, including details regarding any error messages, version, and platform.

Valid children values are not hidden by the struct's validity bitmap in the example, but the abstract says they are.
Struct's validity bitmap: 00001011
Field-0's validity bitmap: 00001001
Field-1's validity bitmap: 00001011

Component(s)

Website

@kou kou changed the title The website is wrong about the struct hiding valid children values in the example [Docs] Wrong about the struct hiding valid children values in the example Nov 27, 2023
@kou
Copy link
Member

kou commented Nov 27, 2023

Hmm. What is the expected validity bitmaps you think?

@stfdxv
Copy link
Contributor Author

stfdxv commented Nov 27, 2023

For example.
Struct's validity bitmap: 00001011
Field-0's validity bitmap: 00001101
Field-1's validity bitmap: 00001111
Struct's values: [{'joe', 1}, {null, 2}, null, {'mark', 4}]
Field-0's values: ['joe', null, 'homer', 'mark']
Field-1's values: [1, 2, 3, 4]

If field-0 or field-1 had valid values at index 2 (hence validity bit 1 at index 2), these values - 'homer' and 3 - would be hidden indeed by the struct's validity bit 0 at index 2.

@kou
Copy link
Member

kou commented Nov 27, 2023

Ah, do you focus on the part?

This is illustrated in the example above, the child arrays have valid entries for the null struct but they are “hidden” by the struct array’s validity bitmap. However, when treated independently, corresponding entries of the children array will be non-null.

I see. Could you open a pull request to fix the example validity bitmaps?

@stfdxv
Copy link
Contributor Author

stfdxv commented Nov 27, 2023

I'll do it.

kou pushed a commit that referenced this issue Dec 18, 2023
…38898)

### Rationale for this change
See the issue.

### What changes are included in this PR?
The struct example now demonstrates what it's supposed to.

### Are these changes tested?
Renders well

### Are there any user-facing changes?
Just docs.

* Closes: #38883

Authored-by: Stas Stepanov <78556261+stfdxv@users.noreply.github.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
@kou kou added this to the 15.0.0 milestone Dec 18, 2023
clayburn pushed a commit to clayburn/arrow that referenced this issue Jan 23, 2024
…try (apache#38898)

### Rationale for this change
See the issue.

### What changes are included in this PR?
The struct example now demonstrates what it's supposed to.

### Are these changes tested?
Renders well

### Are there any user-facing changes?
Just docs.

* Closes: apache#38883

Authored-by: Stas Stepanov <78556261+stfdxv@users.noreply.github.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
dgreiss pushed a commit to dgreiss/arrow that referenced this issue Feb 19, 2024
…try (apache#38898)

### Rationale for this change
See the issue.

### What changes are included in this PR?
The struct example now demonstrates what it's supposed to.

### Are these changes tested?
Renders well

### Are there any user-facing changes?
Just docs.

* Closes: apache#38883

Authored-by: Stas Stepanov <78556261+stfdxv@users.noreply.github.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.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