[Improve](explode) improve explode func with array nested other type (#24455)

improve explode func with array nested other type
This commit is contained in:
amory
2023-09-18 16:05:30 +08:00
committed by GitHub
parent ef4ab106d8
commit 96f197114c
4 changed files with 291 additions and 2 deletions

View File

@ -79,8 +79,16 @@ void VExplodeTableFunction::get_value(MutableColumnPtr& column) {
if (current_empty() || (_detail.nested_nullmap_data && _detail.nested_nullmap_data[pos])) {
column->insert_default();
} else {
column->insert_data(const_cast<char*>(_detail.nested_col->get_data_at(pos).data),
_detail.nested_col->get_data_at(pos).size);
if (_is_nullable) {
assert_cast<ColumnNullable*>(column.get())
->get_nested_column_ptr()
->insert_from(*_detail.nested_col, pos);
assert_cast<ColumnUInt8*>(
assert_cast<ColumnNullable*>(column.get())->get_null_map_column_ptr().get())
->insert_default();
} else {
column->insert_from(*_detail.nested_col, pos);
}
}
}