GH-50859: [C++][Parquet] Move JsonWriter to simdjson utilities - #50990
GH-50859: [C++][Parquet] Move JsonWriter to simdjson utilities#50990rok wants to merge 4 commits into
Conversation
|
The CI failures need fixing. |
|
@pitrou done. |
Done |
|
Again, this PR is purely AI generated. I will mark as ready for review once I review myself. |
|
@rok Are you willing to prioritize this? |
|
@pitrou I'll review this in about an hour and ping again |
|
@github-actions crossbow submit example-cpp-tutorial |
|
Revision: 973b4d2 Submitted crossbow builds: ursacomputing/crossbow @ actions-5765e8701c
|
Parquet uses JsonWriter independently of the Arrow JSON module. Move the writer into the simdjson utilities so it is available whenever simdjson is enabled, including ARROW_JSON=OFF builds. Preserve the writer files as renames and update CMake, Meson, callers, and tests.
973b4d2 to
5a1f424
Compare
| SOURCES | ||
| json_writer_internal_test.cc | ||
| EXTRA_LINK_LIBS | ||
| simdjson::simdjson) |
There was a problem hiding this comment.
Should we use arrow::simdjson here instead? Both should work, but arrow alieas would hide the vendored/system simdjson.
There was a problem hiding this comment.
if(SIMDJSON_VENDORED)
add_library(arrow::simdjson ALIAS simdjson)
else()
add_library(arrow::simdjson ALIAS simdjson::simdjson)
endif()
It seems better to use arrow::simdjson based on the above statements? cc @kou
There was a problem hiding this comment.
Agreed, changed to arrow::simdjson.
|
@github-actions crossbow submit example-cpp-tutorial |
|
Revision: 86e85bd Submitted crossbow builds: ursacomputing/crossbow @ actions-e4578321bd
|
|
@pitrou this is ready for humans! |
|
@github-actions crossbow submit test-ubuntu-24.04-cpp-minimal-with-formats test-ubuntu-24.04-cpp-gcc-13-bundled test-ubuntu-24.04-cpp example-cpp-tutorial |
| #include "arrow/json/object_parser.h" | ||
| #include "arrow/util/json_writer_internal.h" | ||
| #include "arrow/util/secure_string.h" |
There was a problem hiding this comment.
This seems to be a blocking issue.
There was a problem hiding this comment.
Now if ARROW_WITH_SIMDJSON is enabled json/object_parser.cc will be included. ARROW_PARQUET enables ARROW_WITH_SIMDJSON, so this should now be handled. Previously it required ARROW_JSON.
|
Revision: 4d93dff Submitted crossbow builds: ursacomputing/crossbow @ actions-fca50b3ffc
|
|
|
||
| if needs_simdjson | ||
| arrow_util_srcs += [ | ||
| 'util/json_writer_internal.cc', |
There was a problem hiding this comment.
Meson can still compile Parquet encryption with JSON disabled, but json/object_parser.cc remains excluded because needs_json is false. Please build ObjectParser under the same simdjson gate, otherwise this configuration still fails to link.
| SOURCES | ||
| json_writer_internal_test.cc | ||
| EXTRA_LINK_LIBS | ||
| simdjson::simdjson) |
There was a problem hiding this comment.
if(SIMDJSON_VENDORED)
add_library(arrow::simdjson ALIAS simdjson)
else()
add_library(arrow::simdjson ALIAS simdjson::simdjson)
endif()
It seems better to use arrow::simdjson based on the above statements? cc @kou
| #include "arrow/json/object_parser.h" | ||
| #include "arrow/util/json_writer_internal.h" | ||
| #include "arrow/util/secure_string.h" |
There was a problem hiding this comment.
This seems to be a blocking issue.
…ties Fully qualify simdjson utility calls so CMake unity builds do not resolve internal to arrow::json::internal.
bdee2b8 to
ab2c41a
Compare
|
@github-actions crossbow submit test-ubuntu-24.04-cpp-minimal-with-formats test-ubuntu-24.04-cpp-gcc-13-bundled test-ubuntu-24.04-cpp example-cpp-tutorial |
|
Revision: ab2c41a Submitted crossbow builds: ursacomputing/crossbow @ actions-af7350541b
|
Rationale for this change
Parquet uses JsonWriter when ARROW_JSON=OFF, but its implementation was only built with Arrow JSON, causing link failures.
What changes are included in this PR?
Move JsonWriter to the simdjson utilities and update its callers and CMake/Meson builds.
Are these changes tested?
Yes. CMake shared/static and Meson Parquet builds pass with JSON disabled. Unit tests and pre-commit checks also pass.
Are there any user-facing changes?
No. This only fixes the affected build configuration.
AI disclosure - this was AI generated to test alternative approach to #50900.