Reranko05 commented on code in PR #50781:
URL: https://github.com/apache/arrow/pull/50781#discussion_r3720135987
##########
cpp/src/parquet/reader_test.cc:
##########
@@ -1230,14 +1223,15 @@ TEST_F(TestJSONWithLocalFile, JSONOutputSortColumns) {
namespace {
::arrow::Status CheckJsonValid(std::string_view json_string) {
- rj::Document json_doc;
- constexpr auto kParseFlags = rj::kParseFullPrecisionFlag |
rj::kParseNanAndInfFlag;
- json_doc.Parse<kParseFlags>(json_string.data(), json_string.length());
- if (json_doc.HasParseError()) {
- return ::arrow::Status::Invalid("JSON parse error at offset ",
- json_doc.GetErrorOffset(), ": ",
-
rj::GetParseError_En(json_doc.GetParseError()));
+ simdjson::ondemand::parser parser;
+ simdjson::ondemand::document document;
+
+ auto padded_json = simdjson::padded_string(json_string);
+
+ if (auto error = parser.iterate(padded_json).get(document)) {
Review Comment:
Addressed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]