| 330 | } |
| 331 | |
| 332 | static 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 | |
| 351 | bool MsgPackVisitor::visit_positive_integer(UInt64 value) // NOLINT |
| 352 | { |
no test coverage detected