Skip to content

GH-35460: Introduce simdjson and migrate ObjectParser#50469

Draft
Reranko05 wants to merge 10 commits into
apache:mainfrom
Reranko05:gh-35460-simdjson
Draft

GH-35460: Introduce simdjson and migrate ObjectParser#50469
Reranko05 wants to merge 10 commits into
apache:mainfrom
Reranko05:gh-35460-simdjson

Conversation

@Reranko05

@Reranko05 Reranko05 commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Rationale for this change

This PR is the first in a series of PRs for GH-35460 to migrate Arrow's JSON implementation from RapidJSON to simdjson.

As the foundation for the migration, this PR introduces simdjson into Arrow's build system, updates the bundled simdjson version to v4.6.4, and migrates the self-contained arrow::json::internal::ObjectParser.

What changes are included in this PR?

This PR:

  • Introduces simdjson as a third-party dependency.
  • Adds CMake support for discovering and building simdjson.
  • Updates the bundled simdjson dependency to v4.6.4.
  • Adds system package and vcpkg integration required for simdjson across supported build environments.
  • Links simdjson into the Arrow JSON library.
  • Migrates arrow::json::internal::ObjectParser from RapidJSON to the simdjson DOM API.
  • Adds dedicated unit tests covering:
    • String retrieval
    • Boolean retrieval
    • String map extraction
    • Invalid JSON
    • Missing keys
    • Incorrect types
    • Non-object root documents
    • Empty objects

This establishes the build infrastructure needed for the remaining JSON migration, which will be completed incrementally in follow-up PRs.

Are these changes tested?

Yes.

  • Added dedicated unit tests for ObjectParser.
  • Verified the ObjectParser JSON test suite locally.
  • Updated the build system and validated the dependency integration across supported CI configurations (currently 41 CI checks passing; remaining failures are limited to two Windows-specific workflows under investigation).

Related #35460

@github-actions github-actions Bot added the awaiting review Awaiting review label Jul 10, 2026
@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #35460 has been automatically assigned in GitHub to PR creator.

@Reranko05

Copy link
Copy Markdown
Contributor Author

@kou As we discussed, I've started working on the RapidJSON → simdjson migration and will try to split it into small, reviewable PRs. This PR is the first step, introducing the dependency and migrating ObjectParser.

I'm currently investigating the remaining CI failures. The implementation builds locally, the JSON test suite passes, and several CI workflows also pass. The remaining failures all seem to fail during CMake configure because simdjson::simdjson isn't available in some configurations, while other workflows successfully fall back to building simdjson from source.

I've narrowed it down to the dependency integration (FindsimdjsonAlt.cmake / CMake target creation). If there's an existing Arrow pattern you'd recommend for handling this kind of third-party dependency integration, I'd really appreciate your guidance.

@Reranko05 Reranko05 force-pushed the gh-35460-simdjson branch from 34ac15f to a02cc13 Compare July 11, 2026 11:53
@Reranko05 Reranko05 force-pushed the gh-35460-simdjson branch 2 times, most recently from 17a428d to 5ee7a89 Compare July 11, 2026 15:57
@Reranko05 Reranko05 force-pushed the gh-35460-simdjson branch from 5ee7a89 to b2cabab Compare July 11, 2026 16:14
@Reranko05

Copy link
Copy Markdown
Contributor Author

Hi @kou, I've updated the bundled simdjson to v4.6.4, added the required system packages for the SYSTEM dependency path, and added simdjson to the vcpkg manifest. At this point, 41 CI checks are passing and only two Windows-specific workflows are still failing:

  • AMD64 Windows MSVC GLib: link failure with
    unresolved external symbol simdjson::internal::error_codes
  • AMD64 Windows C++ RTools 40 ucrt64: failure while building the bundled simdjson dependency with
    fatal error: had to relocate PCH

I investigated the MSVC failure by looking into the vcpkg integration (cpp/vcpkg.json, FindsimdjsonAlt.cmake, ThirdpartyToolchain.cmake) and also tried a couple of Windows-specific compile definition experiments, but I haven't been able to resolve it yet.

Do you have any suggestions on where I should look next for these remaining Windows-specific issues?

@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #35460 has been automatically assigned in GitHub to PR creator.

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.

1 participant