Reranko05 commented on code in PR #50945:
URL: https://github.com/apache/arrow/pull/50945#discussion_r3896522707


##########
cpp/src/arrow/json/chunker.cc:
##########
@@ -124,40 +102,89 @@ namespace {
 // and uses actual JSON parsing to delimit them.
 class ParsingBoundaryFinder : public BoundaryFinder {
  public:
-  Status FindFirst(string_view partial, string_view block, int64_t* out_pos) 
override {
-    auto length = ConsumeWholeObject(MultiStringStream({partial, block}));
-    if (length == string_view::npos) {
+  Status FindFirst(std::string_view partial, std::string_view block,
+                   int64_t* out_pos) override {
+    std::string combined;
+    std::string_view input;
+
+    if (partial.empty()) {
+      input = block;
+    } else if (block.empty()) {
+      input = partial;
+    } else {
+      combined.reserve(partial.size() + block.size());
+      combined.append(partial);
+      combined.append(block);
+      input = combined;
+    }
+
+    const size_t start = ConsumeWhitespace(combined);
+    if (start < combined.size() && combined[start] != '{' && combined[start] 
!= '[') {

Review Comment:
   Removed. I did not realise it was not needed after I added this for my prev 
attempts.



-- 
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]

Reply via email to