MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / validateHintCompleteness

Function validateHintCompleteness

src/binder/bind/read/bind_match.cpp:29–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27}
28
29static void validateHintCompleteness(const BoundJoinHintNode& root, const QueryGraph& queryGraph) {
30 binder::expression_set set;
31 collectHintPattern(root, set);
32 for (auto& nodeOrRel : queryGraph.getAllPatterns()) {
33 if (nodeOrRel->getVariableName().empty()) {
34 throw BinderException(
35 "Cannot hint join order in a match patter with anonymous node or relationship.");
36 }
37 if (!set.contains(nodeOrRel)) {
38 throw BinderException(
39 std::format("Cannot find {} in join hint.", nodeOrRel->toString()));
40 }
41 }
42}
43
44static bool isAnyGraphNodePattern(const NodeOrRelExpression& pattern,
45 main::ClientContext* context) {

Callers 1

bindJoinHintMethod · 0.85

Calls 6

collectHintPatternFunction · 0.85
getAllPatternsMethod · 0.80
emptyMethod · 0.45
getVariableNameMethod · 0.45
containsMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected