Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix multiplicity and generic type of param in runtime expression #3297

Merged
merged 1 commit into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,7 @@ else if (packageableElement instanceof Root_meta_external_dataquality_DataQuali

private static LambdaFunction generateModelConstraintLambda(PureModel pureModel, Integer queryLimit, Root_meta_external_dataquality_DataQuality packageableElement)
{
if (Objects.isNull(queryLimit))
{
return core_dataquality_generation_dataquality.Root_meta_external_dataquality_generateDataQualityQuery_DataQuality_1__Integer_MANY__LambdaFunction_1_(packageableElement, Lists.immutable.empty(), pureModel.getExecutionSupport());
}
return core_dataquality_generation_dataquality.Root_meta_external_dataquality_generateDataQualityQuery_DataQuality_1__Integer_MANY__LambdaFunction_1_(packageableElement, Lists.immutable.of((long)queryLimit), pureModel.getExecutionSupport());
return core_dataquality_generation_dataquality.Root_meta_external_dataquality_generateDataQualityQuery_DataQuality_1__Integer_$0_1$__LambdaFunction_1_(packageableElement, Objects.isNull(queryLimit) ? null : queryLimit.longValue(), pureModel.getExecutionSupport());
}

private static LambdaFunction<Object> generateRelationValidationLambda(PureModel pureModel, Root_meta_external_dataquality_DataQualityRelationValidation packageableElement, String validationName, Boolean runQuery, Integer resultLimit)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Class meta::external::dataquality::MilestoningContext
}:Boolean[1];
}

function meta::external::dataquality::generateDataQualityQuery(dataquality:meta::external::dataquality::DataQuality<Any>[1], limit: Integer[*]): LambdaFunction<Any>[1]
function meta::external::dataquality::generateDataQualityQuery(dataquality:meta::external::dataquality::DataQuality<Any>[1], limit: Integer[0..1]): LambdaFunction<Any>[1]
{
generateDataQualityQuery($dataquality, $limit, true);
}
Expand Down Expand Up @@ -74,7 +74,7 @@ function meta::external::dataquality::addMilestoningParameters(tree:GraphFetchTr
])
}

function meta::external::dataquality::generateDataQualityQuery(dataquality:meta::external::dataquality::DataQuality<Any>[1], limit: Integer[*], useFrom:Boolean[1]): LambdaFunction<Any>[1]
function meta::external::dataquality::generateDataQualityQuery(dataquality:meta::external::dataquality::DataQuality<Any>[1], limit: Integer[0..1], useFrom:Boolean[1]): LambdaFunction<Any>[1]
{
$dataquality.validationTree->validateTreeForNestedConstraints(true);

Expand Down Expand Up @@ -561,12 +561,12 @@ function meta::external::dataquality::buildFromRuntimeExpression(f: FunctionExpr
functionName=from_T_m__Runtime_1__T_m_.name,
importGroup=system::imports::coreImport,
genericType=$returnType,
multiplicity=ZeroMany,
parametersValues=[$f, ^InstanceValue(values=$runtime->evaluateAndDeactivate(), genericType=^GenericType(rawType=NonExecutableValueSpecification), multiplicity=PureOne)]->evaluateAndDeactivate());
multiplicity=$f.multiplicity,
parametersValues=[$f, ^InstanceValue(values=$runtime->evaluateAndDeactivate(), genericType=$runtime->genericType(), multiplicity=PureOne)]->evaluateAndDeactivate());
}

function meta::external::dataquality::isFromFunctionPresent(func: FunctionDefinition<Any>[1]):Boolean[1]
{
let getExprList = $func->findExpressionsForFunctionInFunctionDefinition([meta::pure::mapping::from_T_m__Runtime_1__T_m_]);
!$getExprList->isEmpty();
}
}
Loading