Skip to content

GH-51037: [C++] Replace RapidJSON with simdjson in JSON parser - #51038

Draft
Reranko05 wants to merge 4 commits into
apache:mainfrom
Reranko05:gh-35460-parser
Draft

GH-51037: [C++] Replace RapidJSON with simdjson in JSON parser#51038
Reranko05 wants to merge 4 commits into
apache:mainfrom
Reranko05:gh-35460-parser

Conversation

@Reranko05

@Reranko05 Reranko05 commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator

Rationale for this change

This PR continues the simdjson migration by replacing the RapidJSON-based parsing implementation used by the JSON parser.

The existing parser uses RapidJSON's SAX/handler interface to parse JSON values and populate Arrow builders. This change replaces that implementation with simdjson's ondemand API while retaining the existing builder and type-inference logic.

Changes

  • Replace the RapidJSON parser and handler interface with simdjson's ondemand API.
  • Parse JSON documents using simdjson::ondemand::parser::iterate_many.
  • Use ResolveSimdjsonResult() consistently when handling simdjson results.
  • Preserve support for nested objects and arrays.
  • Preserve explicit-schema and inferred-field behavior.
  • Preserve unexpected-field handling for Error, Ignore, and InferType.
  • Continue storing numeric values as raw JSON tokens.
  • Trim trailing whitespace from numeric raw tokens to preserve existing behavior.
  • Preserve JSON parse error propagation through Status::Invalid.
  • Remove the parser's RapidJSON-specific dependencies.

Fixes: #51037

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[C++] Replace RapidJSON with simdjson in JSON parser

1 participant