[fix](olap)Crashing caused by IS NULL expression (#17463)
Issue Number: close #17462
This commit is contained in:
@ -587,6 +587,8 @@ public:
|
||||
/// It's a special kind of column, that contain single value, but is not a ColumnConst.
|
||||
virtual bool is_dummy() const { return false; }
|
||||
|
||||
virtual bool is_exclusive() const { return use_count() == 1; }
|
||||
|
||||
/// Clear data of column, just like vector clear
|
||||
virtual void clear() {}
|
||||
|
||||
|
||||
@ -225,6 +225,11 @@ public:
|
||||
bool is_column_array() const override { return get_nested_column().is_column_array(); }
|
||||
bool is_fixed_and_contiguous() const override { return false; }
|
||||
bool values_have_fixed_size() const override { return nested_column->values_have_fixed_size(); }
|
||||
|
||||
bool is_exclusive() const override {
|
||||
return IColumn::is_exclusive() && nested_column->is_exclusive() && null_map->is_exclusive();
|
||||
}
|
||||
|
||||
size_t size_of_value_if_fixed() const override {
|
||||
return null_map->size_of_value_if_fixed() + nested_column->size_of_value_if_fixed();
|
||||
}
|
||||
|
||||
@ -668,7 +668,7 @@ void Block::filter_block_internal(Block* block, const std::vector<uint32_t>& col
|
||||
for (auto& col : columns_to_filter) {
|
||||
auto& column = block->get_by_position(col).column;
|
||||
if (column->size() != count) {
|
||||
if (column->use_count() == 1) {
|
||||
if (column->is_exclusive()) {
|
||||
const auto result_size = column->assume_mutable()->filter(filter);
|
||||
CHECK_EQ(result_size, count);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user