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

Method executeExpressionAndGetColumn

src/DataStreams/ITTLAlgorithm.cpp:27–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25}
26
27ColumnPtr ITTLAlgorithm::executeExpressionAndGetColumn(
28 const ExpressionActionsPtr & expression, const Block & block, const String & result_column)
29{
30 if (!expression)
31 return nullptr;
32
33 if (block.has(result_column))
34 return block.getByName(result_column).column;
35
36 Block block_copy;
37 for (const auto & column_name : expression->getRequiredColumns())
38 block_copy.insert(block.getByName(column_name));
39
40 /// Keep number of rows for const expression.
41 size_t num_rows = block.rows();
42 expression->execute(block_copy, num_rows);
43
44 return block_copy.getByName(result_column).column;
45}
46
47UInt32 ITTLAlgorithm::getTimestampByIndex(const IColumn * column, size_t index) const
48{

Callers

nothing calls this directly

Calls 6

getByNameMethod · 0.80
hasMethod · 0.45
getRequiredColumnsMethod · 0.45
insertMethod · 0.45
rowsMethod · 0.45
executeMethod · 0.45

Tested by

no test coverage detected