diff --git a/legend-engine-core/legend-engine-core-pure/legend-engine-pure-code-compiled-core/src/main/resources/core/pure/lineage/scanProject.pure b/legend-engine-core/legend-engine-core-pure/legend-engine-pure-code-compiled-core/src/main/resources/core/pure/lineage/scanProject.pure index f7480485728..442535bcaa8 100644 --- a/legend-engine-core/legend-engine-core-pure/legend-engine-pure-code-compiled-core/src/main/resources/core/pure/lineage/scanProject.pure +++ b/legend-engine-core/legend-engine-core-pure/legend-engine-pure-code-compiled-core/src/main/resources/core/pure/lineage/scanProject.pure @@ -72,6 +72,11 @@ function <> meta::pure::lineage::scanProject::scanProjectRecursi | let tree = $fe.parametersValues->at(1)->match([s:InstanceValue[1]|$s.values, a:Any[*]|^Unknown()]); ^Project(projectfuncEntryPoint = $fe, columns = scanRootGraphFetchTree($tree->cast(@RootGraphFetchTree)->toOne())); + ), + pair('meta::pure::graphFetch::execution::graphFetchChecked_T_MANY__RootGraphFetchTree_1__Checked_MANY_', + | + let tree = $fe.parametersValues->at(1)->match([s:InstanceValue[1]|$s.values, a:Any[*]|^Unknown()]); + ^Project(projectfuncEntryPoint = $fe, columns = scanRootGraphFetchTree($tree->cast(@RootGraphFetchTree)->toOne())); ) ]; let funcFullPath = $fe.func->toOne()->elementToPath(); diff --git a/legend-engine-xts-analytics/legend-engine-xts-analytics-lineage/legend-engine-xt-analytics-lineage-pure/src/main/resources/core_analytics_lineage/tests/lineageTests.pure b/legend-engine-xts-analytics/legend-engine-xts-analytics-lineage/legend-engine-xt-analytics-lineage-pure/src/main/resources/core_analytics_lineage/tests/lineageTests.pure index 474d3de929a..e2ae3df15ba 100644 --- a/legend-engine-xts-analytics/legend-engine-xts-analytics-lineage/legend-engine-xt-analytics-lineage-pure/src/main/resources/core_analytics_lineage/tests/lineageTests.pure +++ b/legend-engine-xts-analytics/legend-engine-xts-analytics-lineage/legend-engine-xt-analytics-lineage-pure/src/main/resources/core_analytics_lineage/tests/lineageTests.pure @@ -562,4 +562,30 @@ function <> meta::analytics::lineage::tests::re ['Lambda', 'meta::pure::tds::TDSRow', 'meta::relational::tests::milestoning::Product', 'meta::relational::tests::milestoning::ProductClassification', 'pack_meta::pure::tds', 'pack_meta::relational::tests::milestoning'], '[type: [ProductClassificationTable.type , ProductClassificationTable.type , ProductTable.type ]]', $lineage); +} + + +###Pure +import meta::pure::graphFetch::execution::*; +import meta::relational::tests::model::simple::*; +function <> meta::analytics::lineage::tests::relational::graphFetch::testForSimpleRelationalGraphFetchChecked():Boolean[1] +{ + let tree = #{ + Person { + firstName, + lastName + } + }#; + + let query = {|Person.all()->graphFetchChecked($tree)->serialize($tree)}; + let mapping = meta::relational::tests::simpleRelationalMapping; + let runtime = meta::external::store::relational::tests::testRuntime(); + + let lineage = meta::analytics::lineage::computeLineage($query, $mapping, $runtime, meta::relational::extension::relationalExtensions()); + + meta::analytics::lineage::assertLineage(['Lambda', 'db_dbInc', 'tb_dbIncdefaultpersonTable'], + ['Lambda', 'meta::relational::tests::model::simple::Person', 'pack_meta::relational::tests::model::simple'], + '[Person.firstName: [personTable.FIRSTNAME ], Person.lastName: [personTable.LASTNAME ]]', + $lineage); + } \ No newline at end of file