MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / insertUUID

Function insertUUID

src/Processors/Formats/Impl/MsgPackRowInputFormat.cpp:332–349  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

330}
331
332static void insertUUID(IColumn & column, DataTypePtr type, const char * value, size_t size)
333{
334 auto insert_func = [&](IColumn & column_, DataTypePtr type_)
335 {
336 insertUUID(column_, type_, value, size);
337 };
338
339 if (checkAndInsertNullable(column, type, insert_func) || checkAndInsertLowCardinality(column, type, insert_func))
340 return;
341
342 if (!isUUID(type))
343 throw Exception(ErrorCodes::ILLEGAL_COLUMN, "Cannot insert MessagePack UUID into column with type {}.", type->getName());
344 ReadBufferFromMemory buf(value, size);
345 UUID uuid;
346 readBinaryBigEndian(UUIDHelpers::getHighBytes(uuid), buf);
347 readBinaryBigEndian(UUIDHelpers::getLowBytes(uuid), buf);
348 assert_cast<ColumnUUID &>(column).insertValue(uuid);
349}
350
351bool MsgPackVisitor::visit_positive_integer(UInt64 value) // NOLINT
352{

Callers 1

visit_extMethod · 0.85

Calls 8

checkAndInsertNullableFunction · 0.85
readBinaryBigEndianFunction · 0.85
getHighBytesFunction · 0.85
getLowBytesFunction · 0.85
ExceptionClass · 0.50
getNameMethod · 0.45
insertValueMethod · 0.45

Tested by

no test coverage detected