| 1845 | const exec::Expr& expr, |
| 1846 | std::unordered_map<std::string, exec::ExprStats>& stats, |
| 1847 | std::unordered_set<const exec::Expr*>& uniqueExprs) { |
| 1848 | auto it = uniqueExprs.find(&expr); |
| 1849 | if (it != uniqueExprs.end()) { |
| 1850 | // Common sub-expression. Skip to avoid double counting. |
| 1851 | return; |
| 1852 | } |
| 1853 | |
| 1854 | uniqueExprs.insert(&expr); |
| 1855 | |
| 1856 | // Do not aggregate empty stats. |
| 1857 | if (expr.stats().numProcessedRows) { |
| 1858 | stats[expr.name()].add(expr.stats()); |
| 1859 | } |
| 1860 | |
| 1861 | for (const auto& input : expr.inputs()) { |
nothing calls this directly
no test coverage detected