Reranko05 commented on code in PR #51038:
URL: https://github.com/apache/arrow/pull/51038#discussion_r4072035518
##########
cpp/src/arrow/util/simdjson_internal.cc:
##########
@@ -581,4 +581,23 @@ Status ValidateJsonDocument(simdjson::ondemand::parser&
parser,
return ConsumeJsonValue(value);
}
+// XXX We could try to SIMD-accelerate this routine but it's called only
+// once per chunk and also will presumably examine a minimal amount of bytes.
+int64_t ConsumeJsonWhitespace(std::string_view view, bool trailing) {
+ if (!trailing) {
+ const auto pos = view.find_first_not_of(" \t\r\n");
+ return static_cast<int64_t>(pos == std::string_view::npos ? view.size() :
pos);
+ }
+
+ int64_t count = 0;
Review Comment:
You are right. Used `view.find_last_not_of`
--
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]