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

Method visitFunction

src/planner/operator/factorization/flatten_resolver.cpp:163–175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

161}
162
163void GroupDependencyAnalyzer::visitFunction(std::shared_ptr<binder::Expression> expr) {
164 auto& funcExpr = expr->constCast<ScalarFunctionExpression>();
165 for (auto& child : expr->getChildren()) {
166 visit(child);
167 }
168 // For list lambda we need to flatten all dependent expressions in lambda function
169 // E.g. MATCH (a)->(b) RETURN list_filter(a.list, x -> x>b.age)
170 if (funcExpr.getFunction().isListLambda) {
171 auto lambdaFunctionAnalyzer = GroupDependencyAnalyzer(collectDependentExpr, schema);
172 lambdaFunctionAnalyzer.visit(funcExpr.getChild(1));
173 requiredFlatGroups = lambdaFunctionAnalyzer.getDependentGroups();
174 }
175}
176
177void GroupDependencyAnalyzer::visitCase(std::shared_ptr<binder::Expression> expr) {
178 auto& caseExpression = expr->constCast<CaseExpression>();

Callers

nothing calls this directly

Calls 6

getDependentGroupsMethod · 0.80
visitFunction · 0.50
getFunctionMethod · 0.45
visitMethod · 0.45
getChildMethod · 0.45

Tested by

no test coverage detected