mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Header in every stream: development [#CLICKHOUSE-2]
This commit is contained in:
parent
999d59e5ac
commit
dba529d674
@ -43,9 +43,7 @@ Block ExpressionBlockInputStream::readImpl()
|
||||
Block res = children.back()->read();
|
||||
if (!res)
|
||||
return res;
|
||||
|
||||
expression->execute(res);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -29,9 +29,9 @@ FilterBlockInputStream::FilterBlockInputStream(const BlockInputStreamPtr & input
|
||||
children.push_back(input);
|
||||
|
||||
/// Determine position of filter column.
|
||||
Block src_header = expression->getSampleBlock();
|
||||
|
||||
filter_column = src_header.getPositionByName(filter_column_name);
|
||||
Block input_header = input->getHeader();
|
||||
expression->execute(input_header);
|
||||
filter_column = input_header.getPositionByName(filter_column_name);
|
||||
}
|
||||
|
||||
|
||||
|
@ -64,6 +64,7 @@ void IBlockInputStream::dumpTree(std::ostream & ostr, size_t indent, size_t mult
|
||||
ostr << String(indent, ' ') << getName();
|
||||
if (multiplier > 1)
|
||||
ostr << " × " << multiplier;
|
||||
// ostr << ": " << getHeader().dumpStructure();
|
||||
ostr << std::endl;
|
||||
++indent;
|
||||
|
||||
|
@ -473,13 +473,7 @@ BlockInputStreams MergeTreeDataSelectExecutor::read(
|
||||
filter_function->children.push_back(filter_function->arguments);
|
||||
}
|
||||
|
||||
/// Add all other columns: expression must save them.
|
||||
ASTPtr expr_with_filter = std::make_shared<ASTExpressionList>();
|
||||
for (const auto & name : column_names_to_read)
|
||||
expr_with_filter->children.push_back(std::make_shared<ASTIdentifier>(StringRange(), name));
|
||||
expr_with_filter->children.push_back(filter_function);
|
||||
|
||||
filter_expression = ExpressionAnalyzer(expr_with_filter, context, nullptr, available_real_columns).getActions(true);
|
||||
filter_expression = ExpressionAnalyzer(filter_function, context, nullptr, available_real_columns).getActions(true);
|
||||
|
||||
/// Add columns needed for `sampling_expression` to `column_names_to_read`.
|
||||
std::vector<String> add_columns = filter_expression->getRequiredColumns();
|
||||
|
Loading…
Reference in New Issue
Block a user