Skip to content

Add BulkLoadVertex to codec-java - #378

Merged
em3s merged 1 commit into
mainfrom
feature/vertex-bulk-load
Jun 11, 2026
Merged

em3s merged 1 commit into
mainfrom
feature/vertex-bulk-load

Conversation

@em3s

@em3s em3s commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Add BulkLoadVertex and BulkEdgeEncoder.bulkEncodeVertex so external bulk-load jobs (Spark/MR) can encode vertex rows without knowing the (src, tgt="-") encoding. Follow-up to #373; surfaced while wiring Spark vertex bulk-load.

Changes

  • codec-java: add BulkLoadVertex ({active, ts, id, props}) — lowers to BulkLoadEdge(src=id, tgt=VERTEX_MARKER) for the shared pipeline.
  • codec-java: add BulkEdgeEncoder.bulkEncodeVertex — asserts LabelType.VERTEX and rejects id == "-", blocking latent corruption (tgt="-" rows landing in edge tables) that would otherwise survive decode.

How to Test

./gradlew :codec-java:test :codec-java:spotlessCheck

New tests: round-trip decode for active vertex (src=id, tgt="-"), inactive tombstone with the same shape, non-vertex label rejection, reserved-marker id rejection.

AI Assistance

  • This PR was written largely with AI assistance.
    • Tool / model: Claude Code (claude-opus-4-7)

Introduce BulkLoadVertex (`{active, ts, id, props}`) and BulkEdgeEncoder.bulkEncodeVertex so external bulk-load jobs can encode vertex rows without hand-rolling a BulkLoadEdge with `tgt="-"`. The encoder asserts LabelType.VERTEX up-front and lowers into the existing edge pipeline, keeping encoding logic single-sourced.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request labels Jun 11, 2026
@em3s em3s changed the title Add Vertex bulk-load entry point Add BulkLoadVertex to codec-java Jun 11, 2026
@em3s

em3s commented Jun 11, 2026

Copy link
Copy Markdown
Contributor Author

Optimistic

@em3s
em3s merged commit 034aa01 into main Jun 11, 2026
3 checks passed
@em3s
em3s deleted the feature/vertex-bulk-load branch June 11, 2026 07:09
@em3s em3s self-assigned this Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant