eldenmoon commented on code in PR #26749:
URL: https://github.com/apache/doris/pull/26749#discussion_r1393608611
##########
be/src/olap/rowset/segment_v2/column_reader.cpp:
##########
@@ -1462,5 +1481,73 @@ void
DefaultValueColumnIterator::_insert_many_default(vectorized::MutableColumnP
}
}
+Status VariantRootColumnIterator::next_batch(size_t* n,
vectorized::MutableColumnPtr& dst,
+ bool* has_null) {
+ size_t size = dst->size();
+ auto& obj =
+ dst->is_nullable()
+ ? assert_cast<vectorized::ColumnObject&>(
+
assert_cast<vectorized::ColumnNullable&>(*dst).get_nested_column())
+ : assert_cast<vectorized::ColumnObject&>(*dst);
+ if (obj.is_null_root()) {
+ obj.create_root();
+ }
+ auto root_column = obj.get_root();
+ RETURN_IF_ERROR(_inner_iter->next_batch(n, root_column, has_null));
+ obj.incr_num_rows(*n);
+ for (auto& entry : obj.get_subcolumns()) {
+ if (entry->data.size() != size + *n) {
+ entry->data.insertManyDefaults(*n);
Review Comment:
otherwise there maybe a bug, let the code check consistency
```
#ifndef NDEBUG
obj.check_consistency();
#endif
``
--
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]