| 218 | template class DataTypeEnum<Int16>; |
| 219 | |
| 220 | static void checkASTStructure(const ASTPtr & child) |
| 221 | { |
| 222 | const auto * func = child->as<ASTFunction>(); |
| 223 | if (!func |
| 224 | || func->name != "equals" |
| 225 | || func->parameters |
| 226 | || !func->arguments |
| 227 | || func->arguments->children.size() != 2) |
| 228 | throw Exception(ErrorCodes::UNEXPECTED_AST_STRUCTURE, "Elements of Enum data type must be of form: " |
| 229 | "'name' = number, where name is string literal and number is an integer"); |
| 230 | } |
| 231 | |
| 232 | struct EnumElementLiterals |
| 233 | { |
no test coverage detected