| 760 | } |
| 761 | |
| 762 | bool SQLClusterRouter::IsConstQuery(::hybridse::vm::PhysicalOpNode* node) { |
| 763 | if (node->GetOpType() == ::hybridse::vm::kPhysicalOpConstProject) { |
| 764 | return true; |
| 765 | } |
| 766 | |
| 767 | if (node->GetProducerCnt() <= 0) { |
| 768 | return false; |
| 769 | } |
| 770 | |
| 771 | for (size_t i = 0; i < node->GetProducerCnt(); i++) { |
| 772 | if (!IsConstQuery(node->GetProducer(i))) { |
| 773 | return false; |
| 774 | } |
| 775 | } |
| 776 | return true; |
| 777 | } |
| 778 | void SQLClusterRouter::GetTables(::hybridse::vm::PhysicalOpNode* node, |
| 779 | std::set<std::string>* tables) { |
| 780 | if (node == NULL || tables == NULL) return; |
nothing calls this directly
no outgoing calls
no test coverage detected