Update explain for filter

This commit is contained in:
Nikolai Kochetov 2021-01-19 15:54:55 +03:00
parent 0246e3eace
commit 9db2974aaa

View File

@ -83,7 +83,11 @@ void FilterStep::transformPipeline(QueryPipeline & pipeline)
void FilterStep::describeActions(FormatSettings & settings) const void FilterStep::describeActions(FormatSettings & settings) const
{ {
String prefix(settings.offset, ' '); String prefix(settings.offset, ' ');
settings.out << prefix << "Filter column: " << filter_column_name << '\n'; settings.out << prefix << "Filter column: " << filter_column_name;
if (remove_filter_column)
settings.out << " (removed)";
settings.out << '\n';
bool first = true; bool first = true;
auto expression = std::make_shared<ExpressionActions>(actions_dag); auto expression = std::make_shared<ExpressionActions>(actions_dag);
@ -94,6 +98,11 @@ void FilterStep::describeActions(FormatSettings & settings) const
first = false; first = false;
settings.out << action.toString() << '\n'; settings.out << action.toString() << '\n';
} }
settings.out << prefix << "Positions:";
for (const auto & pos : expression->getResultPositions())
settings.out << ' ' << pos;
settings.out << '\n';
} }
} }