@@ -10900,10 +10900,10 @@ static RegisterNode<SubQueryNode> regSubQueryNode({
1090010900 blr_via, blr_from, blr_average, blr_count, blr_maximum, blr_minimum, blr_total
1090110901});
1090210902
10903- SubQueryNode::SubQueryNode (MemoryPool& pool, UCHAR aBlrOp, RecordSourceNode* aDsqlRse ,
10903+ SubQueryNode::SubQueryNode (MemoryPool& pool, UCHAR aBlrOp, SelectExprNode* aDsqlSelectExpr ,
1090410904 ValueExprNode* aValue1, ValueExprNode* aValue2)
1090510905 : TypedNode<ValueExprNode, ExprNode::TYPE_SUBQUERY>(pool),
10906- dsqlRse(aDsqlRse ),
10906+ dsqlSelectExpr(aDsqlSelectExpr ),
1090710907 value1(aValue1),
1090810908 value2(aValue2),
1090910909 subQuery(NULL ),
@@ -10946,11 +10946,7 @@ void SubQueryNode::getChildren(NodeRefsHolder& holder, bool dsql) const
1094610946{
1094710947 ValueExprNode::getChildren (holder, dsql);
1094810948
10949- if (dsql)
10950- holder.add (dsqlRse);
10951- else
10952- holder.add (rse);
10953-
10949+ holder.add (rse);
1095410950 holder.add (value1);
1095510951 holder.add (value2);
1095610952}
@@ -10961,7 +10957,7 @@ string SubQueryNode::internalPrint(NodePrinter& printer) const
1096110957
1096210958 NODE_PRINT (printer, blrOp);
1096310959 NODE_PRINT (printer, ownSavepoint);
10964- NODE_PRINT (printer, dsqlRse );
10960+ NODE_PRINT (printer, dsqlSelectExpr );
1096510961 NODE_PRINT (printer, rse);
1096610962 NODE_PRINT (printer, value1);
1096710963 NODE_PRINT (printer, value2);
@@ -10980,10 +10976,11 @@ ValueExprNode* SubQueryNode::dsqlPass(DsqlCompilerScratch* dsqlScratch)
1098010976
1098110977 const DsqlContextStack::iterator base (*dsqlScratch->context );
1098210978
10983- RseNode* rse = PASS1_rse (dsqlScratch, nodeAs<SelectExprNode>(dsqlRse) , false );
10979+ RseNode* rse = PASS1_rse (dsqlScratch, dsqlSelectExpr , false );
1098410980
10985- SubQueryNode* node = FB_NEW_POOL (dsqlScratch->getPool ()) SubQueryNode (dsqlScratch->getPool (), blrOp, rse ,
10981+ SubQueryNode* node = FB_NEW_POOL (dsqlScratch->getPool ()) SubQueryNode (dsqlScratch->getPool (), blrOp, dsqlSelectExpr ,
1098610982 rse->dsqlSelectList ->items [0 ], NullNode::instance ());
10983+ node->rse = rse;
1098710984
1098810985 // Finish off by cleaning up contexts.
1098910986 dsqlScratch->context ->clear (base);
@@ -10999,7 +10996,7 @@ void SubQueryNode::setParameterName(dsql_par* parameter) const
1099910996void SubQueryNode::genBlr (DsqlCompilerScratch* dsqlScratch)
1100010997{
1100110998 dsqlScratch->appendUChar (blrOp);
11002- GEN_expr (dsqlScratch, dsqlRse );
10999+ GEN_expr (dsqlScratch, rse );
1100311000 GEN_expr (dsqlScratch, value1);
1100411001 GEN_expr (dsqlScratch, value2);
1100511002}
@@ -11015,12 +11012,12 @@ void SubQueryNode::make(DsqlCompilerScratch* dsqlScratch, dsc* desc)
1101511012
1101611013bool SubQueryNode::dsqlAggregateFinder (AggregateFinder& visitor)
1101711014{
11018- return !visitor.ignoreSubSelects && visitor.visit (dsqlRse );
11015+ return !visitor.ignoreSubSelects && visitor.visit (rse );
1101911016}
1102011017
1102111018bool SubQueryNode::dsqlAggregate2Finder (Aggregate2Finder& visitor)
1102211019{
11023- return visitor.visit (dsqlRse ); // Pass only the rse.
11020+ return visitor.visit (rse ); // Pass only the rse.
1102411021}
1102511022
1102611023bool SubQueryNode::dsqlSubSelectFinder (SubSelectFinder& /* visitor*/ )
@@ -11030,13 +11027,13 @@ bool SubQueryNode::dsqlSubSelectFinder(SubSelectFinder& /*visitor*/)
1103011027
1103111028bool SubQueryNode::dsqlFieldFinder (FieldFinder& visitor)
1103211029{
11033- return visitor.visit (dsqlRse ); // Pass only the rse.
11030+ return visitor.visit (rse ); // Pass only the rse.
1103411031}
1103511032
1103611033ValueExprNode* SubQueryNode::dsqlFieldRemapper (FieldRemapper& visitor)
1103711034{
11038- doDsqlFieldRemapper (visitor, dsqlRse );
11039- value1 = nodeAs<RseNode>(dsqlRse) ->dsqlSelectList ->items [0 ];
11035+ doDsqlFieldRemapper (visitor, rse );
11036+ value1 = rse ->dsqlSelectList ->items [0 ];
1104011037 return this ;
1104111038}
1104211039
0 commit comments