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

Method createColumn

src/Storages/StorageFuzzJSON.cpp:512–539  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

510};
511
512ColumnPtr FuzzJSONSource::createColumn()
513{
514 auto column = ColumnString::create();
515 ColumnString::Chars & data_to = column->getChars();
516 ColumnString::Offsets & offsets_to = column->getOffsets();
517
518 offsets_to.resize(block_size);
519 IColumn::Offset offset = 0;
520
521 for (size_t row_num = 0; row_num < block_size; ++row_num)
522 {
523 WriteBufferFromOwnString out;
524 fuzzJSONObject(json_root, out, config, rnd);
525
526 auto data = out.str();
527 size_t data_len = data.size();
528
529 IColumn::Offset next_offset = offset + data_len;
530 data_to.resize(next_offset);
531
532 std::copy(data.begin(), data.end(), &data_to[offset]);
533
534 offsets_to[row_num] = next_offset;
535 offset = next_offset;
536 }
537
538 return column;
539}
540
541}
542

Callers 15

getHeaderMethod · 0.45
parseArrayContentMethod · 0.45
generateMethod · 0.45
evaluateFilterMethod · 0.45
applyFiltersMethod · 0.45
getHeaderMethod · 0.45
fillPhysicalColumnsMethod · 0.45
readMethod · 0.45
getSampleBlockMethod · 0.45
getIndexFromASTMethod · 0.45

Calls 9

fuzzJSONObjectFunction · 0.85
createFunction · 0.70
getCharsMethod · 0.45
getOffsetsMethod · 0.45
resizeMethod · 0.45
strMethod · 0.45
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by 1