| 8592 | |
| 8593 | |
| 8594 | void DerivedFieldNode::getContextNumbers(Firebird::SortedArray<USHORT>& contextNumbers, const DsqlContextStack& contextStack) |
| 8595 | { |
| 8596 | for (DsqlContextStack::const_iterator stack(contextStack); stack.hasData(); ++stack) |
| 8597 | { |
| 8598 | const auto* const context = stack.object(); |
| 8599 | |
| 8600 | if (context->ctx_win_maps.hasData()) |
| 8601 | { |
| 8602 | for (const auto& winMap : context->ctx_win_maps) |
| 8603 | { |
| 8604 | // bottleneck |
| 8605 | fb_assert(winMap->context <= MAX_UCHAR); |
| 8606 | |
| 8607 | if (!contextNumbers.exist(winMap->context)) |
| 8608 | contextNumbers.add(winMap->context); |
| 8609 | } |
| 8610 | } |
| 8611 | else |
| 8612 | { |
| 8613 | // bottleneck |
| 8614 | fb_assert(context->ctx_context <= MAX_UCHAR); |
| 8615 | |
| 8616 | if (!contextNumbers.exist(context->ctx_context)) |
| 8617 | contextNumbers.add(context->ctx_context); |
| 8618 | } |
| 8619 | } |
| 8620 | } |
| 8621 | |
| 8622 | string DerivedFieldNode::internalPrint(NodePrinter& printer) const |
| 8623 | { |