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

Method getSampleBlockWithVirtuals

src/Storages/StorageInMemoryMetadata.cpp:393–403  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

391}
392
393Block StorageInMemoryMetadata::getSampleBlockWithVirtuals(const NamesAndTypesList & virtuals) const
394{
395 auto res = getSampleBlock();
396
397 /// Virtual columns must be appended after ordinary, because user can
398 /// override them.
399 for (const auto & column : virtuals)
400 res.insert({column.type->createColumn(), column.type, column.name});
401
402 return res;
403}
404
405Block StorageInMemoryMetadata::getSampleBlock(bool include_func_columns) const
406{

Callers 4

readMethod · 0.80
readMethod · 0.80
getHeaderMethod · 0.80
getSampleBlockMethod · 0.80

Calls 2

insertMethod · 0.45
createColumnMethod · 0.45

Tested by

no test coverage detected