| 404 | bool useDefaultImplementationForConstants() const override { return true; } |
| 405 | |
| 406 | ColumnPtr executeImpl(const ColumnsWithTypeAndName & arguments, const DataTypePtr & ret_type, size_t input_rows_count) const override |
| 407 | { |
| 408 | |
| 409 | switch (arguments[0].type->getTypeId()) |
| 410 | { |
| 411 | case TypeIndex::IPv4: return executeTyped<IPv4>(arguments, ret_type, input_rows_count); |
| 412 | case TypeIndex::UInt8: return executeTyped<UInt8>(arguments, ret_type, input_rows_count); |
| 413 | case TypeIndex::UInt16: return executeTyped<UInt16>(arguments, ret_type, input_rows_count); |
| 414 | case TypeIndex::UInt32: return executeTyped<UInt32>(arguments, ret_type, input_rows_count); |
| 415 | default: break; |
| 416 | } |
| 417 | |
| 418 | throw Exception( |
| 419 | ErrorCodes::ILLEGAL_COLUMN, |
| 420 | "Illegal column {} of argument of function {}, expected IPv4 or UInt8 or UInt16 or UInt32", |
| 421 | arguments[0].column->getName(), getName() |
| 422 | ); |
| 423 | } |
| 424 | }; |
| 425 | |
| 426 | template <IPStringToNumExceptionMode exception_mode> |