| 1496 | } |
| 1497 | |
| 1498 | static ActionsDAG cloneSubdagWithInputs(const SharedHeader & stream_header, ActionsDAG::NodeRawConstPtrs & keys) |
| 1499 | { |
| 1500 | ActionsDAG dag(stream_header->getColumnsWithTypeAndName(), /* duplicate_const_columns */ false); |
| 1501 | |
| 1502 | ActionsDAG::NodeMapping node_map; |
| 1503 | auto second_dag = ActionsDAG::cloneSubDAG(keys, node_map, false); |
| 1504 | |
| 1505 | remapNodes(keys, node_map); |
| 1506 | node_map.clear(); |
| 1507 | |
| 1508 | dag.mergeInplace(std::move(second_dag), node_map, true); |
| 1509 | remapNodes(keys, node_map); |
| 1510 | |
| 1511 | dag.getOutputs() = dag.getInputs(); |
| 1512 | dag.getOutputs().append_range(keys | std::views::filter([&](const auto * node) { return node->type != ActionsDAG::ActionType::INPUT; })); |
| 1513 | |
| 1514 | return dag; |
| 1515 | } |
| 1516 | |
| 1517 | std::optional<std::pair<JoinStepLogical::ActionsDAGWithKeys, JoinStepLogical::ActionsDAGWithKeys>> |
| 1518 | JoinStepLogical::preCalculateKeys(const SharedHeader & left_header, const SharedHeader & right_header) |
no test coverage detected