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

Method write

src/Storages/Distributed/DistributedBlockOutputStream.cpp:153–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

151
152
153void DistributedBlockOutputStream::write(const Block & block)
154{
155 Block ordinary_block{ block };
156
157 if (!allow_materialized)
158 {
159 /* They are added by the AddingDefaultBlockOutputStream, and we will get
160 * different number of columns eventually */
161 for (const auto & col : metadata_snapshot->getColumns().getMaterialized())
162 {
163 if (ordinary_block.has(col.name))
164 {
165 ordinary_block.erase(col.name);
166 LOG_DEBUG(log, "{}: column {} will be removed, because it is MATERIALIZED",
167 storage.getStorageID().getNameForLogs(), col.name);
168 }
169 }
170 }
171
172 if (insert_sync)
173 writeSync(ordinary_block);
174 else
175 writeAsync(ordinary_block);
176}
177
178void DistributedBlockOutputStream::writeAsync(const Block & block)
179{

Callers 4

writeAndConvertFunction · 0.45
writeBlockConvertFunction · 0.45
runWritingJobMethod · 0.45
writeToShardMethod · 0.45

Calls 6

getMaterializedMethod · 0.80
getColumnsMethod · 0.45
hasMethod · 0.45
eraseMethod · 0.45
getNameForLogsMethod · 0.45
getStorageIDMethod · 0.45

Tested by

no test coverage detected