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


##########
be/src/vec/exec/format/json/new_json_reader.cpp:
##########
@@ -412,14 +417,24 @@ Status NewJsonReader::_parse_dynamic_json(bool* 
is_empty_row, bool* eof,
     }
 
     _bytes_read_counter += size;
-
+    MutableColumnPtr& dynamic_column = columns.back();
+    auto& column_object = 
assert_cast<vectorized::ColumnObject&>(*(dynamic_column.get()));
+    Defer __finalize_clousure([&] {
+        // Reached buffer size, unfold intermediate column object
+        size_t batch_size = std::max(_state->batch_size(), 
(int)_MIN_BATCH_SIZE);
+        if (column_object.size() >= batch_size || _reader_eof) {
+            column_object.finalize();
+            // flatten object columns for the purpose of extracting static 
columns and
+            // fill default values missing in static columns
+            schema_util::unfold_object(columns.size() - 1, columns, 
_slot_desc_index, slot_descs,

Review Comment:
   flatten renamed to unfold



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to