[feature-wip](array-type) ArrayFileColumnIterator bug fix (#9114)
This commit is contained in:
@ -417,7 +417,8 @@ Status ArrayFileColumnIterator::next_batch(size_t* n, ColumnBlockView* dst, bool
|
||||
array_batch->get_offset_by_length(dst->current_offset(), *n);
|
||||
|
||||
// 2. read null
|
||||
if (dst->is_nullable()) {
|
||||
if (_array_reader->is_nullable()) {
|
||||
DCHECK(dst->is_nullable());
|
||||
auto null_batch = array_batch->get_null_as_batch();
|
||||
ColumnBlock null_block(&null_batch, nullptr);
|
||||
ColumnBlockView null_view(&null_block, dst->current_offset());
|
||||
|
||||
@ -351,7 +351,7 @@ public:
|
||||
ordinal_t start_offset_in_this_page =
|
||||
_length_iterator->get_current_page()->first_array_item_ordinal;
|
||||
ColumnBlock ordinal_block(_length_batch.get(), nullptr);
|
||||
ordinal_t size_to_read = ord - start_offset_in_this_page;
|
||||
ordinal_t size_to_read = ord - _length_iterator->get_current_ordinal();
|
||||
bool has_null = false;
|
||||
ordinal_t item_ordinal = start_offset_in_this_page;
|
||||
while (size_to_read > 0) {
|
||||
|
||||
@ -463,6 +463,13 @@ void SegmentIterator::_init_lazy_materialization() {
|
||||
}
|
||||
_opts.delete_condition_predicates->get_all_column_ids(predicate_columns);
|
||||
|
||||
// ARRAY column do not support lazy materialization read
|
||||
for (auto cid : _schema.column_ids()) {
|
||||
if (_schema.column(cid)->type() == OLAP_FIELD_TYPE_ARRAY) {
|
||||
predicate_columns.insert(cid);
|
||||
}
|
||||
}
|
||||
|
||||
// when all return columns have predicates, disable lazy materialization to avoid its overhead
|
||||
if (_schema.column_ids().size() > predicate_columns.size()) {
|
||||
_lazy_materialization_read = true;
|
||||
|
||||
Reference in New Issue
Block a user