| 420 | } |
| 421 | |
| 422 | static DataTypePtr getLeastCommonTypeForDynamicColumnsImpl( |
| 423 | const DataTypePtr & type_in_storage, const DataTypes & concrete_types, bool check_ambiguos_paths) |
| 424 | { |
| 425 | if (!type_in_storage->hasDynamicSubcolumns()) |
| 426 | return type_in_storage; |
| 427 | |
| 428 | if (isObject(type_in_storage)) |
| 429 | return getLeastCommonTypeForObject(concrete_types, check_ambiguos_paths); |
| 430 | |
| 431 | if (const auto * type_array = typeid_cast<const DataTypeArray *>(type_in_storage.get())) |
| 432 | return getLeastCommonTypeForColumnWithNestedType(*type_array, concrete_types, check_ambiguos_paths); |
| 433 | |
| 434 | if (const auto * type_map = typeid_cast<const DataTypeMap *>(type_in_storage.get())) |
| 435 | return getLeastCommonTypeForColumnWithNestedType(*type_map, concrete_types, check_ambiguos_paths); |
| 436 | |
| 437 | if (const auto * type_tuple = typeid_cast<const DataTypeTuple *>(type_in_storage.get())) |
| 438 | return getLeastCommonTypeForTuple(*type_tuple, concrete_types, check_ambiguos_paths); |
| 439 | |
| 440 | throw Exception(ErrorCodes::LOGICAL_ERROR, "Type {} unexpectedly has dynamic columns", type_in_storage->getName()); |
| 441 | } |
| 442 | |
| 443 | DataTypePtr getLeastCommonTypeForDynamicColumns( |
| 444 | const DataTypePtr & type_in_storage, const DataTypes & concrete_types, bool check_ambiguos_paths) |
no test coverage detected