Skip to content

Commit

Permalink
fix multiplicity and generic type of param (#3297)
Browse files Browse the repository at this point in the history
  • Loading branch information
keenkeystrokes authored Dec 11, 2024
1 parent 127e82b commit 4b55d98
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
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();
}
}

0 comments on commit 4b55d98

Please sign in to comment.