MCPcopy Create free account
hub / github.com/ByConity/ByConity / executeImpl

Method executeImpl

src/Functions/FunctionsCodingIP.cpp:406–423  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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
426template <IPStringToNumExceptionMode exception_mode>

Callers

nothing calls this directly

Calls 4

getNameFunction · 0.70
ExceptionClass · 0.50
getTypeIdMethod · 0.45
getNameMethod · 0.45

Tested by

no test coverage detected