From 9cb8bf1e6b0fe328657123171c03291b28627096 Mon Sep 17 00:00:00 2001 From: AFine-gs <69924417+AFine-gs@users.noreply.github.com> Date: Mon, 25 Nov 2024 13:29:45 -0500 Subject: [PATCH] revert scan relations update (#3272) --- .../lineage/scanRelations/scanRelations.pure | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-pure/legend-engine-xt-relationalStore-core-pure/src/main/resources/core_relational/relational/lineage/scanRelations/scanRelations.pure b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-pure/legend-engine-xt-relationalStore-core-pure/src/main/resources/core_relational/relational/lineage/scanRelations/scanRelations.pure index 2f51573523f..31dd40ebd57 100644 --- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-pure/legend-engine-xt-relationalStore-core-pure/src/main/resources/core_relational/relational/lineage/scanRelations/scanRelations.pure +++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-pure/legend-engine-xt-relationalStore-core-pure/src/main/resources/core_relational/relational/lineage/scanRelations/scanRelations.pure @@ -393,7 +393,7 @@ Class meta::pure::lineage::scanRelations::RelationalTreeAndVars } function <> meta::pure::lineage::scanRelations::generatRelationalTrees(f:FunctionDefinition[1], m:Mapping[1], r:Runtime[1], vars:Pair>[*], 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() , @@ -402,12 +402,8 @@ function <> 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(values=$value));, + let re = $vs->reactivate($a); + $a->put($varName->toOne(), ^List(values=$re));, | $a; );