Skip to content

Commit

Permalink
Fix report lineage for graphFetchChecked (#3305)
Browse files Browse the repository at this point in the history
  • Loading branch information
srimoyeeb-gs authored Dec 16, 2024
1 parent 5a43b2e commit 59e691b
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ function <<access.private>> 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<Any>)->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<Any>)->toOne()));
)
];
let funcFullPath = $fe.func->toOne()->elementToPath();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -562,4 +562,30 @@ function <<meta::pure::profiles::test.Test>> 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 <JoinTreeNode>, ProductClassificationTable.type <TableAliasColumn>, ProductTable.type <JoinTreeNode>]]',
$lineage);
}


###Pure
import meta::pure::graphFetch::execution::*;
import meta::relational::tests::model::simple::*;
function <<test.Test>> 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 <TableAliasColumn>], Person.lastName: [personTable.LASTNAME <TableAliasColumn>]]',
$lineage);

}

0 comments on commit 59e691b

Please sign in to comment.