[refactor](column) remove get_data_type in IColumn (#25242)
This commit is contained in:
@ -84,21 +84,8 @@ size_t getNumberOfDimensions(const IDataType& type) {
|
||||
}
|
||||
|
||||
DataTypePtr get_data_type_by_column(const IColumn& column) {
|
||||
auto idx = column.get_data_type();
|
||||
if (WhichDataType(idx).is_simple()) {
|
||||
return DataTypeFactory::instance().create_data_type(idx);
|
||||
}
|
||||
if (WhichDataType(idx).is_nothing()) {
|
||||
return std::make_shared<DataTypeNothing>();
|
||||
}
|
||||
if (const auto* column_array = check_and_get_column<ColumnArray>(&column)) {
|
||||
return std::make_shared<DataTypeArray>(get_data_type_by_column(column_array->get_data()));
|
||||
}
|
||||
if (const auto* column_nullable = check_and_get_column<ColumnNullable>(&column)) {
|
||||
return make_nullable(get_data_type_by_column(column_nullable->get_nested_column()));
|
||||
}
|
||||
// TODO add more types
|
||||
assert(false);
|
||||
// Removed in the future PR
|
||||
// assert(false);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user