Remove column from header descriotion for EXPLAIN PLAN and EXPLAIN PIPELINE

This commit is contained in:
Nikolai Kochetov 2020-09-28 20:37:11 +03:00
parent 8f21c73b76
commit 347080ff9a
4 changed files with 9 additions and 3 deletions

View File

@ -27,7 +27,7 @@ bool ColumnWithTypeAndName::operator==(const ColumnWithTypeAndName & other) cons
} }
void ColumnWithTypeAndName::dumpStructure(WriteBuffer & out) const void ColumnWithTypeAndName::dumpNameAndType(WriteBuffer & out) const
{ {
out << name; out << name;
@ -35,6 +35,11 @@ void ColumnWithTypeAndName::dumpStructure(WriteBuffer & out) const
out << ' ' << type->getName(); out << ' ' << type->getName();
else else
out << " nullptr"; out << " nullptr";
}
void ColumnWithTypeAndName::dumpStructure(WriteBuffer & out) const
{
dumpNameAndType(out);
if (column) if (column)
out << ' ' << column->dumpStructure(); out << ' ' << column->dumpStructure();

View File

@ -33,6 +33,7 @@ struct ColumnWithTypeAndName
ColumnWithTypeAndName cloneEmpty() const; ColumnWithTypeAndName cloneEmpty() const;
bool operator==(const ColumnWithTypeAndName & other) const; bool operator==(const ColumnWithTypeAndName & other) const;
void dumpNameAndType(WriteBuffer & out) const;
void dumpStructure(WriteBuffer & out) const; void dumpStructure(WriteBuffer & out) const;
String dumpStructure() const; String dumpStructure() const;
}; };

View File

@ -45,7 +45,7 @@ static void doDescribeHeader(const Block & header, size_t count, IQueryPlanStep:
settings.out << prefix; settings.out << prefix;
first = false; first = false;
elem.dumpStructure(settings.out); elem.dumpNameAndType(settings.out);
settings.out << '\n'; settings.out << '\n';
} }
} }

View File

@ -225,7 +225,7 @@ static void explainStep(
settings.out << "\n" << prefix << " "; settings.out << "\n" << prefix << " ";
first = false; first = false;
elem.dumpStructure(settings.out); elem.dumpNameAndType(settings.out);
} }
} }