Skip to content

Commit

Permalink
[IR] Fix dumping nested QueryGraphs.
Browse files Browse the repository at this point in the history
Nested queries in SQL require an alias but internally created nested
queries, e.g. due to HAVING, do not have to.
  • Loading branch information
JorisNix committed Feb 13, 2024
1 parent 1c253e5 commit e9291cf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/IR/QueryGraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2076,12 +2076,12 @@ void QueryGraph::dump(std::ostream &out) const
auto &srcs = j->sources();
for (auto it = srcs.begin(), end = srcs.end(); it != end; ++it) {
if (it != srcs.begin()) out << ' ';
if (it->get().alias()) {
if (it->get().alias())
out << it->get().alias();
} else {
auto bt = as<const BaseTable>(it->get());
out << bt.name();
}
else if (auto bt = cast<const BaseTable>(&it->get()))
out << bt->name();
else
out << "(...)";
}
out << "} " << j->condition();
}
Expand Down

0 comments on commit e9291cf

Please sign in to comment.