eldenmoon commented on code in PR #39022:
URL: https://github.com/apache/doris/pull/39022#discussion_r1726522531


##########
be/src/vec/json/path_in_data.cpp:
##########
@@ -170,6 +178,33 @@ PathInData PathInData::copy_pop_front() const {
     return copy_pop_nfront(1);
 }
 
+PathInData PathInData::get_nested_prefix_path() const {
+    CHECK(has_nested_part());
+    PathInData new_path;
+    Parts new_parts;
+    for (const Part& part : parts) {
+        new_parts.push_back(part);
+        if (part.is_nested) {
+            break;
+        }
+    }
+    new_path.build_path(new_parts);

Review Comment:
   i think seperate them may improve performance, for example ,in copy 
constructor, we could copy directly from other.path and avoid build the path, 
the copy constructor is frequent



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to