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

[Format] C Data Interface: clarify nullability of buffer pointers #14805

Closed
pitrou opened this issue Dec 1, 2022 · 0 comments · Fixed by #14808
Closed

[Format] C Data Interface: clarify nullability of buffer pointers #14805

pitrou opened this issue Dec 1, 2022 · 0 comments · Fixed by #14808

Comments

@pitrou
Copy link
Member

pitrou commented Dec 1, 2022

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

In apache/arrow-nanoarrow#76 it was reported that some implementations may export zero-length buffers as a null pointer in the ArrowArray structure.

Given that this seems to be an accepted behavior in several implementations, we should probably make it explicitly legal in the C Data Interface spec.

Component(s)

Format

@pitrou pitrou self-assigned this Dec 1, 2022
@pitrou pitrou added this to the 11.0.0 milestone Dec 1, 2022
pitrou added a commit to pitrou/arrow that referenced this issue Dec 1, 2022
pitrou added a commit that referenced this issue Dec 1, 2022
…inters (#14808)

* Closes: #14805

Authored-by: Antoine Pitrou <antoine@python.org>
Signed-off-by: Antoine Pitrou <antoine@python.org>
pitrou added a commit to pitrou/arrow that referenced this issue Dec 1, 2022
pitrou added a commit to pitrou/arrow that referenced this issue Jan 17, 2023
The C data interface may expose null data pointers for zero-sized buffers.
Make sure that all buffer pointers remain non-null internally.

Followup to apacheGH-14805.
pitrou added a commit that referenced this issue Jan 17, 2023
…14814)

The C data interface may expose null data pointers for zero-sized buffers.
Make sure that all buffer pointers remain non-null internally.

Followup to GH-14805

* Closes: #14875

Authored-by: Antoine Pitrou <antoine@python.org>
Signed-off-by: Antoine Pitrou <antoine@python.org>
raulcd pushed a commit that referenced this issue Jan 18, 2023
…14814)

The C data interface may expose null data pointers for zero-sized buffers.
Make sure that all buffer pointers remain non-null internally.

Followup to GH-14805

* Closes: #14875

Authored-by: Antoine Pitrou <antoine@python.org>
Signed-off-by: Antoine Pitrou <antoine@python.org>
lidavidm added a commit that referenced this issue Jan 31, 2023
…33951)

### Rationale for this change

While #14805 clarified that NULL buffers are valid in the C Data Interface, not all implementations handle this correctly (or were fixed, but earlier versions still exist).

### What changes are included in this PR?

Export a non-NULL dummy buffer for nil/empty buffers to ensure compatibility.

### Are these changes tested?

A regression test is included.
* Closes: #33936

Authored-by: David Li <li.davidm96@gmail.com>
Signed-off-by: David Li <li.davidm96@gmail.com>
sjperkins pushed a commit to sjperkins/arrow that referenced this issue Feb 10, 2023
…ffers (apache#33951)

### Rationale for this change

While apache#14805 clarified that NULL buffers are valid in the C Data Interface, not all implementations handle this correctly (or were fixed, but earlier versions still exist).

### What changes are included in this PR?

Export a non-NULL dummy buffer for nil/empty buffers to ensure compatibility.

### Are these changes tested?

A regression test is included.
* Closes: apache#33936

Authored-by: David Li <li.davidm96@gmail.com>
Signed-off-by: David Li <li.davidm96@gmail.com>
gringasalpastor pushed a commit to gringasalpastor/arrow that referenced this issue Feb 17, 2023
…ffers (apache#33951)

### Rationale for this change

While apache#14805 clarified that NULL buffers are valid in the C Data Interface, not all implementations handle this correctly (or were fixed, but earlier versions still exist).

### What changes are included in this PR?

Export a non-NULL dummy buffer for nil/empty buffers to ensure compatibility.

### Are these changes tested?

A regression test is included.
* Closes: apache#33936

Authored-by: David Li <li.davidm96@gmail.com>
Signed-off-by: David Li <li.davidm96@gmail.com>
fatemehp pushed a commit to fatemehp/arrow that referenced this issue Feb 24, 2023
…ffers (apache#33951)

### Rationale for this change

While apache#14805 clarified that NULL buffers are valid in the C Data Interface, not all implementations handle this correctly (or were fixed, but earlier versions still exist).

### What changes are included in this PR?

Export a non-NULL dummy buffer for nil/empty buffers to ensure compatibility.

### Are these changes tested?

A regression test is included.
* Closes: apache#33936

Authored-by: David Li <li.davidm96@gmail.com>
Signed-off-by: David Li <li.davidm96@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.

1 participant