eldenmoon commented on code in PR #45947:
URL: https://github.com/apache/doris/pull/45947#discussion_r1903928475
##########
be/src/vec/columns/column_object.cpp:
##########
@@ -1262,10 +1296,34 @@ void ColumnObject::add_nested_subcolumn(const
PathInData& key, const FieldInfo&
ENABLE_CHECK_CONSISTENCY(this);
}
+void ColumnObject::set_num_rows(size_t n) {
+ // for (auto& entry : subcolumns) {
+ // if (auto size = entry->data.size(); size < n) {
+ // entry->data.insert_many_defaults(n - size);
+ // } else if (size > n) {
+ // CHECK(false) << entry->path.get_path() << " has more data";
+ // }
+ // }
+ // if (auto size = serialized_sparse_column->size(); size < n) {
+ // serialized_sparse_column->insert_many_defaults(n - size);
+ // } else if (size > n) {
+ // CHECK(false) << " sparse column has more data";
+ // }
+ // check
+ num_rows = n;
+ // ENABLE_CHECK_CONSISTENCY(this);
+}
+
bool ColumnObject::try_add_new_subcolumn(const PathInData& path) {
- if (subcolumns.size() == config::variant_max_subcolumns_count) return
false;
+ bool no_root = subcolumns.get_root() == nullptr;
Review Comment:
CHECK(subcolumns.get_root() != nullptr || path.empty())
--
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]