Repository navigation
Commit bbbc06f
authored
### 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.
### Are there any user-facing changes?
No
### Was AI used for this PR?
In accordance to the [AI generation guidelines](https://arrow.apache.org/docs/dev/developers/overview.html#ai-generated-code), please disclose below whether and how AI was used in this PR.
**PR code and description written by:**
- [X] Human
- [X] AI
**Reviewed before submission by:**
- [X] Human
- [X] AI
- [ ] Not reviewed
Fixes: #51037
* GitHub Issue: #51037
Authored-by: Aaditya Srinivasan <aadityasri03@gmail.com>
Signed-off-by: Antoine Pitrou <antoine@python.org>
1 parent 1afe206 commit bbbc06f
8 files changed
Lines changed: 346 additions & 413 deletions
File tree
- cpp
- cmake_modules
- src/arrow
- json
- util
- python/pyarrow/tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2869 | 2869 | | |
2870 | 2870 | | |
2871 | 2871 | | |
| 2872 | + | |
| 2873 | + | |
| 2874 | + | |
| 2875 | + | |
2872 | 2876 | | |
2873 | 2877 | | |
2874 | 2878 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | 35 | | |
46 | 36 | | |
47 | 37 | | |
| |||
156 | 146 | | |
157 | 147 | | |
158 | 148 | | |
159 | | - | |
| 149 | + | |
| 150 | + | |
160 | 151 | | |
161 | 152 | | |
162 | 153 | | |
| |||
0 commit comments