| 517 | } |
| 518 | |
| 519 | void TableScan::addDynamicFilter( |
| 520 | const core::PlanNodeId& producer, |
| 521 | column_index_t outputChannel, |
| 522 | const std::shared_ptr<common::Filter>& filter) { |
| 523 | if (dataSource_) { |
| 524 | dataSource_->addDynamicFilter(outputChannel, filter); |
| 525 | } |
| 526 | auto& currentFilter = pendingDynamicFilters_[outputChannel]; |
| 527 | if (currentFilter) { |
| 528 | currentFilter = currentFilter->mergeWith(filter.get()); |
| 529 | } else { |
| 530 | currentFilter = filter; |
| 531 | } |
| 532 | pendingDynamicFilters_.emplace(outputChannel, currentFilter); |
| 533 | stats_.wlock()->dynamicFilterStats.producerNodeIds.emplace(producer); |
| 534 | } |
| 535 | |
| 536 | void TableScan::estimateBytesPerRow( |
| 537 | const std::optional<RowVectorPtr>& dataOptional) { |