| 1859 | } |
| 1860 | |
| 1861 | for (const auto& input : expr.inputs()) { |
| 1862 | addStats(*input, stats, uniqueExprs); |
| 1863 | } |
| 1864 | } |
| 1865 | } // namespace |
| 1866 | |
| 1867 | std::unordered_map<std::string, exec::ExprStats> ExprSet::stats() const { |
| 1868 | std::unordered_map<std::string, exec::ExprStats> stats; |
| 1869 | std::unordered_set<const exec::Expr*> uniqueExprs; |
| 1870 | for (const auto& expr : exprs()) { |
| 1871 | addStats(*expr, stats, uniqueExprs); |
| 1872 | } |
| 1873 | |
| 1874 | return stats; |
| 1875 | } |
| 1876 | |
| 1877 | ExprSet::~ExprSet() { |
| 1878 | exprSetListeners().withRLock([&](auto& listeners) { |
| 1879 | if (!listeners.empty()) { |
| 1880 | auto exprStats = stats(); |
| 1881 | |
| 1882 | std::vector<std::string> sqls; |
| 1883 | std::vector<VectorPtr> complexConstants; |
| 1884 | |