Skip to content

Replace duplicated code with csb_repeat::getName function #8611

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 3 additions & 13 deletions src/jrd/RecordSourceNodes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3646,14 +3646,9 @@ void RseNode::planCheck(const CompilerScratch* csb) const
{
const auto stream = node->getStream();

const auto relation = csb->csb_rpt[stream].csb_relation;
const auto procedure = csb->csb_rpt[stream].csb_procedure;
fb_assert(relation || procedure);

if (!csb->csb_rpt[stream].csb_plan)
{
const auto name = relation ? relation->rel_name.toQuotedString() :
procedure ? procedure->getName().toQuotedString() : "";
const auto name = csb->csb_rpt[stream].getName(false).toQuotedString();

ERR_post(Arg::Gds(isc_no_stream_plan) << Arg::Str(name));
}
Expand Down Expand Up @@ -3715,9 +3710,7 @@ void RseNode::planSet(CompilerScratch* csb, PlanNode* plan)

if (tail->csb_map)
{
auto tailName = tail->csb_relation ? tail->csb_relation->rel_name :
tail->csb_procedure ? tail->csb_procedure->getName() :
QualifiedName();
auto tailName = tail->getName();

// If the user has specified an alias, skip past it to find the alias
// for the base table (if multiple aliases are specified)
Expand Down Expand Up @@ -3828,10 +3821,7 @@ void RseNode::planSet(CompilerScratch* csb, PlanNode* plan)
}
else
{
duplicateName =
relation ? relation->rel_name :
procedure ? procedure->getName() :
QualifiedName();
duplicateName = duplicateTail->getName();

map = duplicateMap;
tail = duplicateTail;
Expand Down
1 change: 1 addition & 0 deletions src/jrd/exe.h
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,7 @@ inline QualifiedName CompilerScratch::csb_repeat::getName(bool allowEmpty) const
else if (csb_table_value_fun)
return QualifiedName(csb_table_value_fun->name);
//// TODO: LocalTableSourceNode
//// TODO: JsonTableSourceNode
else
{
fb_assert(allowEmpty);
Expand Down
Loading