Skip to content

feat(java): add chunk and edge-range primitives - #968

Open
keksmd wants to merge 2 commits into
apache:mainfrom
keksmd:codex/java-core-ranges-upstream
Open

feat(java): add chunk and edge-range primitives#968
keksmd wants to merge 2 commits into
apache:mainfrom
keksmd:codex/java-core-ranges-upstream

Conversation

@keksmd

@keksmd keksmd commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Reason for this PR

Implements #967 (and relates to #947/#944): the complete dependency-light Java core contract for resolving an ordered GraphAr adjacency range.

What changes are included in this PR?

  • Adds graphar-core with long-safe chunk arithmetic and half-open edge/chunk range value types.
  • Validates ordered offset chunks, including monotonicity and terminal edge-count checks.
  • Resolves EdgeInfo ordered-by-source/destination metadata into the exact offset location, edge range, edge-count URI, and selected adjacency chunk URIs.
  • Verifies the canonical LDBC metadata layout and the cross-edge-chunk boundary [1008, 1061) at chunk size 1024.

This PR delegates URI construction to EdgeInfo; it deliberately does not read Parquet offsets or depend on storage/Parquet. That physical reader belongs after the open #961 IO API change.

Are these changes tested?

Yes.

GAR_TEST_DATA=/private/tmp/graphar-pr967/testing mvn --no-transfer-progress -f maven-projects/pom.xml -pl core -am clean verify -Dspotless.check.skip=true
mvn --no-transfer-progress -f maven-projects/pom.xml -pl core -am spotless:check

The reactor passes 8 core tests plus the graphar-info dependency suite. pre-commit run --files ... and git diff --check also pass.

Are there any user-facing changes?

Yes. Java consumers can now resolve ordered-adjacency metadata and validated offset ranges to exact GraphAr chunk URIs without introducing physical IO dependencies.

Checklist

  • I have self-reviewed this PR
  • I have run make cpplint (if this PR contains C++ changes)
  • I have run pre-commit
  • I have run the relevant tests

Provide the storage-free arithmetic layer needed by future ordered adjacency readers without coupling it to GraphAr metadata or physical IO.

Relates to apache#967.

Rejected: resolving metadata layouts or reading offsets in this value-only slice.
@keksmd

keksmd commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

Hi @SemyonSinchenko — this is a deliberately small, independent Java core slice (419 lines, 6 focused tests) after #960/#962. It provides only the long-safe half-open chunk/range value layer; metadata URI resolution and IO stay out of this PR. I would appreciate your review when convenient.

Complete the core-only ordered-adjacency contract: validate offset chunks, select exact half-open edge chunk ranges, and delegate URI resolution to immutable GraphAr metadata.

Relates to apache#967.

Rejected: reading Parquet offsets in graphar-core; io-parquet remains behind the open apache#961 API change.
@keksmd

keksmd commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

Updated this PR into the complete ordered-adjacency core vertical (now 848 additions): validated offset chunks, metadata URI resolution, and the canonical LDBC cross-chunk fixture. It remains independent of #961 by keeping Parquet reads out of core.

@SemyonSinchenko
SemyonSinchenko self-requested a review August 24, 2026 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant