taepper commented on code in PR #50781:
URL: https://github.com/apache/arrow/pull/50781#discussion_r3718502214
##########
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:
(in the case we really want to keep supporting `NaN`/`Inf` here, the tests
were using json to generate test data for our Float computations so it was
required. Again, it is not part of the JSON RFC so dropping support for it here
is defendable, although many JSON libraries such as RapidJSON do support it)
--
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]