Skip to content

Commit

Permalink
revert scan relations update (#3272)
Browse files Browse the repository at this point in the history
  • Loading branch information
AFine-gs authored Nov 25, 2024
1 parent 5fe2f7a commit 9cb8bf1
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ Class meta::pure::lineage::scanRelations::RelationalTreeAndVars
}

function <<access.private>> meta::pure::lineage::scanRelations::generatRelationalTrees(f:FunctionDefinition<Any>[1], m:Mapping[1], r:Runtime[1], vars:Pair<String, List<Any>>[*], debug:DebugContext[1], extensions:Extension[*]):RelationalTreeAndVars[1]
{
{
let routed = $f->routeFunction($m, $r, $extensions, $debug);
let routedFunction = $routed->evaluateAndDeactivate()->toOne();
let inScopeVars = $f.expressionSequence->evaluateAndDeactivate()->fold({vs, a | if ($vs->isLetFunction() ,
Expand All @@ -402,12 +402,8 @@ function <<access.private>> meta::pure::lineage::scanRelations::generatRelationa
let inScopeVars = $a->keyValues();
let unavailableVars = $varExprs.name->forAll(var | $var->in($inScopeVars.first));
assert($unavailableVars, 'Unable to resolve var(s): '+ $varExprs.name->filter(var | !$var->in($inScopeVars.first))->joinStrings());

let value = if($vs.genericType.rawType->toOne()->instanceOf(PrimitiveType) && !$vs->cast(@SimpleFunctionExpression).parametersValues->at(1)->instanceOf(InstanceValue),
| ^PlanVarPlaceHolder(name=$varName->toOne(), type = $vs.genericType.rawType->toOne(), multiplicity=$vs.multiplicity),
| $vs->reactivate($a);
);
$a->put($varName->toOne(), ^List<Any>(values=$value));,
let re = $vs->reactivate($a);
$a->put($varName->toOne(), ^List<Any>(values=$re));,

| $a;
);
Expand Down

0 comments on commit 9cb8bf1

Please sign in to comment.