Skip to content

MINOR: Reject non zero offset on array import - #1263

Merged
jbonofre merged 5 commits into
apache:mainfrom
robert3005:rk/importoffset
Aug 31, 2026
Merged

MINOR: Reject non zero offset on array import#1263
jbonofre merged 5 commits into
apache:mainfrom
robert3005:rk/importoffset

Conversation

@robert3005

Copy link
Copy Markdown
Contributor

What's Changed

Instead of silently accepting the array and pretending the import went fine reject arrays where offset is non 0. Add mention to the docs that this is not supported

This is documentation and negative case for #251

@github-actions

This comment has been minimized.

@lidavidm lidavidm added the bug-fix PRs that fix a big. label Aug 25, 2026
@github-actions github-actions Bot added this to the 20.0.0 milestone Aug 25, 2026
Comment thread c/src/main/java/org/apache/arrow/c/ArrayImporter.java Outdated
Comment thread c/src/main/java/org/apache/arrow/c/ArrayImporter.java
@robert3005

Copy link
Copy Markdown
Contributor Author

Thanks for the suggestion, I applied it and added test to make sure we don't regress it in the future

@jbonofre

Copy link
Copy Markdown
Member

@robert3005 thanks! I'm doing a new pass 😄

@jbonofre

Copy link
Copy Markdown
Member

By the way, we merged a fix on CI, I will rebase.

kou pushed a commit that referenced this pull request Aug 31, 2026
The `JNI macos-15-intel x86_64` job currently fails on `main` and on
every open PR while installing dependencies:

```
==> Installing node
Error: node: no bottle available!
This is a Tier 3 configuration:
  https://docs.brew.sh/Support-Tiers#tier-3
Installing node has failed!
`brew bundle` failed! 1 Brewfile dependency failed to install
```

`apache/arrow`'s `cpp/Brewfile` lists `brew "node"`, and Homebrew treats
x86_64 macOS as a tier 3 configuration and no longer builds a bottle for
it. `brew bundle` doesn't build from source, so the step aborts before
anything is built.

We don't need Node.js for the JNI build, so this skips installing it via
`HOMEBREW_BUNDLE_BREW_SKIP`, the same way #1269 did for `aws-sdk-cpp`
and gRPC.

Failing runs for reference:

* `main`:
https://github.com/apache/arrow-java/actions/runs/33283736388/job/99183221397
* PR #1263:
https://github.com/apache/arrow-java/actions/runs/33297775855/job/99221106761
Signed-off-by: Robert Kruszewski <github@robertk.io>
Signed-off-by: Robert Kruszewski <github@robertk.io>
Null arrays export no buffers (n_buffers == 0), so the offset has nothing
to apply to and never enters the import: doImport short-circuits to an
empty buffer list and NullVector.loadFieldBuffers only reads the field
node length. Arrow C++ still propagates a slice offset onto the struct for
these arrays, so rejecting them regressed imports that previously
succeeded, e.g. a sliced all-null column.
@jbonofre

Copy link
Copy Markdown
Member

@robert3005 I updated the checkState() to consider Null and avoid potential IllegalStateException.

I will merge as soon as CI is green.

@jbonofre
jbonofre merged commit 371b73d into apache:main Aug 31, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug-fix PRs that fix a big.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants