Skip to content

Commit 15f341d

Browse files
author
Artyom Abakumov
committed
Prepare csb_repeat::getName for JSON_TABLE
1 parent 29bca14 commit 15f341d

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

src/jrd/RecordSourceNodes.cpp

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3646,14 +3646,9 @@ void RseNode::planCheck(const CompilerScratch* csb) const
36463646
{
36473647
const auto stream = node->getStream();
36483648

3649-
const auto relation = csb->csb_rpt[stream].csb_relation;
3650-
const auto procedure = csb->csb_rpt[stream].csb_procedure;
3651-
fb_assert(relation || procedure);
3652-
36533649
if (!csb->csb_rpt[stream].csb_plan)
36543650
{
3655-
const auto name = relation ? relation->rel_name.toQuotedString() :
3656-
procedure ? procedure->getName().toQuotedString() : "";
3651+
const auto name = csb->csb_rpt[stream].getName(false).toQuotedString();
36573652

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

37163711
if (tail->csb_map)
37173712
{
3718-
auto tailName = tail->csb_relation ? tail->csb_relation->rel_name :
3719-
tail->csb_procedure ? tail->csb_procedure->getName() :
3720-
QualifiedName();
3713+
auto tailName = tail->getName();
37213714

37223715
// If the user has specified an alias, skip past it to find the alias
37233716
// for the base table (if multiple aliases are specified)
@@ -3828,10 +3821,7 @@ void RseNode::planSet(CompilerScratch* csb, PlanNode* plan)
38283821
}
38293822
else
38303823
{
3831-
duplicateName =
3832-
relation ? relation->rel_name :
3833-
procedure ? procedure->getName() :
3834-
QualifiedName();
3824+
duplicateName = duplicateTail->getName();
38353825

38363826
map = duplicateMap;
38373827
tail = duplicateTail;

src/jrd/exe.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -728,6 +728,7 @@ inline QualifiedName CompilerScratch::csb_repeat::getName(bool allowEmpty) const
728728
else if (csb_table_value_fun)
729729
return QualifiedName(csb_table_value_fun->name);
730730
//// TODO: LocalTableSourceNode
731+
//// TODO: JsonTableSourceNode
731732
else
732733
{
733734
fb_assert(allowEmpty);

0 commit comments

Comments
 (0)