rfc: add RFC 0051, JSON output via Arrow - #622
Merged
azimafroozeh merged 2 commits intoSep 4, 2026
Merged
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Merged
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
TL;DR: To turn Arrow batches into JSON we kept our own conversion layer: two hand-written encoders that copy every value into a
serde_json::Valuebefore serializing it. Arrow already ships that conversion asarrow-json, typed at each cell's own width. Using it deletes both encoders and the copy: less code, faster output, and the narrow-float bug class cannot come back. What OmniGraph still owns is small: thebase64:blob substitution, a date-range check, and the export line envelope. Exact types come from Arrow IPC on request. Three implementation PRs follow this one.This PR adds RFC 0051, JSON output via Arrow: every JSON body OmniGraph writes for graph data becomes the
arrow-jsonrendering of the result batches with the crate's default options, replacing the two hand-written encoders; a client that needs exact types requests Arrow IPC instead.serde_json::Value; bug: F32 values come back with widened digits #618 is that shape made visible, since theF32fix has to land in both encoders.arrow-jsonis pinned by the lock file and an upgrade that changes a spelling is treated as a wire change.base64:blob substitution on export and entity fetch, a date-range check before the writer, and the export line envelope.Accepton the query routes.rfc/0050-engine-crate-topologybranch, 0047 and 0048 by rfc: search contracts and retrieval algebra #606).Backing issue / RFC
docs/rfcs/0051-json-output-via-arrow.md(no issue; maintainer-track RFC)Checklist
Local verification
python3 scripts/check-docs.py: OK, 125 Markdown files checked (the CI "Verify documentation structure and RFC registry" step)git diff --check upstream/main: cleancargo check --workspace: not run, docs-only change, no Rust file touchedNotes for reviewers
null. Each default is a spelling change listed in the phase table; the alternative of per-type overrides was rejected because every override is OmniGraph deciding a spelling, which is the thing being removed.DateorDateTimecount outside the formatter's range (arrow-jsonwrites anERROR:string withOkfor those, so OmniGraph checks the range itself).ReadOutput.rowsandLegacyReadOutput.rowschange type toRawValuein phase 1: the OpenAPI schema is unchanged, Rust consumers ofomnigraph-api-typessee the type change.arrow-json58.3.0's actual output, not a reading of its source; the differential test in Evidence pins them.rfc/0050-engine-crate-topologybranch; if that branch opens no PR, this RFC takes 0050 and the registry line moves to 0051.