Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion be/src/vec/columns/column_nullable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,8 @@ ColumnPtr ColumnNullable::filter(const Filter& filt, ssize_t result_size_hint) c
}

Status ColumnNullable::filter_by_selector(const uint16_t* sel, size_t sel_size, IColumn* col_ptr) {
const ColumnNullable* nullable_col_ptr = reinterpret_cast<const ColumnNullable*>(col_ptr);
const ColumnNullable* nullable_col_ptr = check_and_get_column<ColumnNullable>(col_ptr);
DCHECK(nullable_col_ptr != nullptr);
ColumnPtr nest_col_ptr = nullable_col_ptr->nested_column;
ColumnPtr null_map_ptr = nullable_col_ptr->null_map;
RETURN_IF_ERROR(get_nested_column().filter_by_selector(sel, sel_size, const_cast<doris::vectorized::IColumn*>(nest_col_ptr.get())));
Expand Down
9 changes: 6 additions & 3 deletions be/src/vec/core/block.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,17 @@ class Block {
raw_res_ptr->reserve(batch_size);

// adapt for outer join change column to nullable
if (raw_res_ptr->is_nullable()) {
if (raw_res_ptr->is_nullable() && input_col_ptr->is_nullable()) {
return input_col_ptr->filter_by_selector(sel_rowid_idx, select_size, raw_res_ptr);
} else if (raw_res_ptr->is_nullable()) {
auto col_ptr_nullable =
reinterpret_cast<vectorized::ColumnNullable*>(raw_res_ptr.get());
col_ptr_nullable->get_null_map_column().insert_many_defaults(select_size);
raw_res_ptr = col_ptr_nullable->get_nested_column_ptr();
return input_col_ptr->filter_by_selector(sel_rowid_idx, select_size, raw_res_ptr);
} else {
return Status::InternalError("unexpected input/output type in block.copy_column_data_to_block");
}

return input_col_ptr->filter_by_selector(sel_rowid_idx, select_size, raw_res_ptr);
}

void replace_by_position(size_t position, ColumnPtr&& res) {
Expand Down