| 201 | } |
| 202 | |
| 203 | static DataTypePtr create(const ASTPtr & arguments) |
| 204 | { |
| 205 | if (!arguments || arguments->children.empty()) |
| 206 | return std::make_shared<DataTypeVariant>(DataTypes{}); |
| 207 | |
| 208 | DataTypes nested_types; |
| 209 | nested_types.reserve(arguments->children.size()); |
| 210 | |
| 211 | for (const ASTPtr & child : arguments->children) |
| 212 | nested_types.emplace_back(DataTypeFactory::instance().get(child)); |
| 213 | |
| 214 | return std::make_shared<DataTypeVariant>(nested_types); |
| 215 | } |
| 216 | |
| 217 | bool isVariantExtension(const DataTypePtr & from_type, const DataTypePtr & to_type) |
| 218 | { |
no test coverage detected