MCPcopy Create free account
hub / github.com/4paradigm/OpenMLDB / IsConstQuery

Method IsConstQuery

src/sdk/sql_cluster_router.cc:762–777  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

760}
761
762bool 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}
778void SQLClusterRouter::GetTables(::hybridse::vm::PhysicalOpNode* node,
779 std::set<std::string>* tables) {
780 if (node == NULL || tables == NULL) return;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected