mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 17:12:03 +00:00
Merge pull request #15422 from ClickHouse/query-plan-header-remove-columns
Remove column from header descriotion for EXPLAIN PLAN
This commit is contained in:
commit
33487c0e4a
@ -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;
|
||||
|
||||
@ -35,6 +35,11 @@ void ColumnWithTypeAndName::dumpStructure(WriteBuffer & out) const
|
||||
out << ' ' << type->getName();
|
||||
else
|
||||
out << " nullptr";
|
||||
}
|
||||
|
||||
void ColumnWithTypeAndName::dumpStructure(WriteBuffer & out) const
|
||||
{
|
||||
dumpNameAndType(out);
|
||||
|
||||
if (column)
|
||||
out << ' ' << column->dumpStructure();
|
||||
|
@ -33,6 +33,7 @@ struct ColumnWithTypeAndName
|
||||
ColumnWithTypeAndName cloneEmpty() const;
|
||||
bool operator==(const ColumnWithTypeAndName & other) const;
|
||||
|
||||
void dumpNameAndType(WriteBuffer & out) const;
|
||||
void dumpStructure(WriteBuffer & out) const;
|
||||
String dumpStructure() const;
|
||||
};
|
||||
|
@ -45,7 +45,7 @@ static void doDescribeHeader(const Block & header, size_t count, IQueryPlanStep:
|
||||
settings.out << prefix;
|
||||
|
||||
first = false;
|
||||
elem.dumpStructure(settings.out);
|
||||
elem.dumpNameAndType(settings.out);
|
||||
settings.out << '\n';
|
||||
}
|
||||
}
|
||||
|
@ -225,7 +225,7 @@ static void explainStep(
|
||||
settings.out << "\n" << prefix << " ";
|
||||
|
||||
first = false;
|
||||
elem.dumpStructure(settings.out);
|
||||
elem.dumpNameAndType(settings.out);
|
||||
}
|
||||
}
|
||||
|
||||
|
7
tests/queries/0_stateless/01508_explain_header.reference
Normal file
7
tests/queries/0_stateless/01508_explain_header.reference
Normal file
@ -0,0 +1,7 @@
|
||||
Expression (Projection)
|
||||
Header: x UInt8
|
||||
Expression (Before ORDER BY and SELECT)
|
||||
Header: _dummy UInt8
|
||||
1 UInt8
|
||||
ReadFromStorage (Read from SystemOne)
|
||||
Header: dummy UInt8
|
1
tests/queries/0_stateless/01508_explain_header.sql
Normal file
1
tests/queries/0_stateless/01508_explain_header.sql
Normal file
@ -0,0 +1 @@
|
||||
explain header = 1 select 1 as x;
|
Loading…
Reference in New Issue
Block a user