Dimitry Sibiryakov wrote 25.12.2025 17:56:
> Some nodes return `this` from dsqlPass() and some nodes return a new instance
> of the same node class.
A concrete example:
```
BoolExprNode* BinaryBoolNode::dsqlPass(DsqlCompilerScratch* dsqlScratch)
{
return FB_NEW_POOL(dsqlScratch->getPool())
BinaryBoolNode(dsqlScratch->getPool(), blrOp,
arg1->dsqlPass(dsqlScratch), arg2->dsqlPass(dsqlScratch));
}
```
will be something wrong if this code is rewritten like this?
```
BoolExprNode* BinaryBoolNode::dsqlPass(DsqlCompilerScratch* dsqlScratch)
{
arg1 = arg1->dsqlPass(dsqlScratch);
arg2 = arg2->dsqlPass(dsqlScratch);
return this;
}
```
I tried it and nothing bad happened because in every test I used the
scratch's pool was the same as node's pool.
--
WBR, SD.