[jboss-jira] [JBoss JIRA] (DROOLS-5272) Re-evaluate/refactor KiePMML AST factories

Gabriele Cardosi (Jira) issues at jboss.org
Wed Jul 1 09:38:54 EDT 2020


     [ https://issues.redhat.com/browse/DROOLS-5272?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gabriele Cardosi updated DROOLS-5272:
-------------------------------------
    Description: 
Re-evaluate implementation of KiePMML AST factories in the view of the mining model specifications.

Reevaluate usage of fieldTypeMap - types.

 

E.g.: inside 

DroolsModelProvider.getKiePMMLDroolsASTCommon the 

Map<String, KiePMMLOriginalTypeGeneratedType> fieldTypeMap is populated invoking 

addTransformationsDerivedFields. Then, a  List<KiePMMLDroolsType> is created out of this map.

Later the same map is also populated by 

KiePMMLDataDictionaryASTFactory.factory(fieldTypeMap).declareTypes(dataDictionary).

and the List<KiePMMLDroolsType> retrieved by the latter are added to the one created before.

That means it is not needed to have KiePMMLDerivedFieldASTFactory and KiePMMLDataDictionaryASTFactory returning List<KiePMMLDroolsType> - they can simply instantiate and return a Map<String, KiePMMLOriginalTypeGeneratedType>; the maps may be merged together, and the List<KiePMMLDroolsType> may be created out of that (merged) map.

So

1) KiePMMLDataDictionaryASTFactory and KiePMMLDerivedFieldASTFactory should return only a newly instantiated Map<String, KiePMMLOriginalTypeGeneratedType>

2) inside DroolsModelProvider.getKiePMMLDroolsASTCommon those maps should be merged 

3) List<KiePMMLDroolsType> should be created out of the merged map 

4) merged map and  List<KiePMMLDroolsType> should be propagated as parameters

  was:Re-evaluate implementation of KiePMML AST factories in the view of the mining model specifications.



> Re-evaluate/refactor KiePMML AST factories
> ------------------------------------------
>
>                 Key: DROOLS-5272
>                 URL: https://issues.redhat.com/browse/DROOLS-5272
>             Project: Drools
>          Issue Type: Task
>            Reporter: Gabriele Cardosi
>            Assignee: Gabriele Cardosi
>            Priority: Major
>              Labels: TrustyAI
>
> Re-evaluate implementation of KiePMML AST factories in the view of the mining model specifications.
> Reevaluate usage of fieldTypeMap - types.
>  
> E.g.: inside 
> DroolsModelProvider.getKiePMMLDroolsASTCommon the 
> Map<String, KiePMMLOriginalTypeGeneratedType> fieldTypeMap is populated invoking 
> addTransformationsDerivedFields. Then, a  List<KiePMMLDroolsType> is created out of this map.
> Later the same map is also populated by 
> KiePMMLDataDictionaryASTFactory.factory(fieldTypeMap).declareTypes(dataDictionary).
> and the List<KiePMMLDroolsType> retrieved by the latter are added to the one created before.
> That means it is not needed to have KiePMMLDerivedFieldASTFactory and KiePMMLDataDictionaryASTFactory returning List<KiePMMLDroolsType> - they can simply instantiate and return a Map<String, KiePMMLOriginalTypeGeneratedType>; the maps may be merged together, and the List<KiePMMLDroolsType> may be created out of that (merged) map.
> So
> 1) KiePMMLDataDictionaryASTFactory and KiePMMLDerivedFieldASTFactory should return only a newly instantiated Map<String, KiePMMLOriginalTypeGeneratedType>
> 2) inside DroolsModelProvider.getKiePMMLDroolsASTCommon those maps should be merged 
> 3) List<KiePMMLDroolsType> should be created out of the merged map 
> 4) merged map and  List<KiePMMLDroolsType> should be propagated as parameters



--
This message was sent by Atlassian Jira
(v7.13.8#713008)



More information about the jboss-jira mailing list