Skip to content

Commit

Permalink
Cleanup a symbol table access.
Browse files Browse the repository at this point in the history
  • Loading branch information
EpsilonPrime committed Jul 5, 2023
1 parent 07fc316 commit 359424d
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/substrait/textplan/converter/PlanPrinterVisitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -760,12 +760,10 @@ std::any PlanPrinterVisitor::visitReadRelation(
return "";
}

auto mainSymbol = symbolTable_->lookupSymbolByLocationAndType(
PROTO_LOCATION(relation), SymbolType::kRelation);

auto symbols = symbolTable_->lookupSymbolsByLocation(PROTO_LOCATION(*msg));
if (!symbols.empty()) {
text << " source " << symbols[0]->name << ";\n";
auto source = symbolTable_->lookupSymbolByLocationAndType(
PROTO_LOCATION(*msg), SymbolType::kSource);
if (source != nullptr) {
text << " source " << source->name << ";\n";
}

if (relation.has_base_schema()) {
Expand Down

0 comments on commit 359424d

Please sign in to comment.