-
Task
-
Resolution: Done
-
Major
-
None
-
None
-
None
-
5
-
Medium
-
NEW
-
NEW
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
- is related to
-
DROOLS-5270 Refactor KiePMMLPredicate AST Factories
- Closed