adonis0147 commented on code in PR #10065:
URL: https://github.com/apache/incubator-doris/pull/10065#discussion_r894652397


##########
be/src/olap/rowset/segment_v2/column_reader.cpp:
##########
@@ -461,6 +461,46 @@ Status ArrayFileColumnIterator::next_batch(size_t* n, 
ColumnBlockView* dst, bool
     return Status::OK();
 }
 
+Status ArrayFileColumnIterator::next_batch(size_t* n, 
vectorized::MutableColumnPtr& dst,
+                                           bool* has_null) {
+    const auto* column_array = 
vectorized::check_and_get_column<vectorized::ColumnArray>(
+            dst->is_nullable() ? 
static_cast<vectorized::ColumnNullable&>(*dst).get_nested_column()
+                               : *dst);
+
+    bool offsets_has_null = false;
+    auto column_offsets_ptr = 
column_array->get_offsets_column().assume_mutable();
+    auto start = column_offsets_ptr->size();
+    _length_iterator->next_batch(n, column_offsets_ptr, &offsets_has_null);
+    auto& column_offsets =
+            
static_cast<vectorized::ColumnArray::ColumnOffsets&>(*column_offsets_ptr);
+    auto& offsets_data = column_offsets.get_data();
+    for (int i = start; i < offsets_data.size(); ++i) {

Review Comment:
   It is not the case here, because the size of `offsets_data` is limited to 
the number of entries read from file and the number is limited to the batch 
size.



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