Closed TobiasNx closed 2 years ago
Are you sure that litA: dragon
is actually emitted? That's exactly what the test org.metafacture.metamorph.functions.LookupTest.shouldLookupValuesInLocalMap
covers, isn't it? 1: b
is not emitted there.
This is also consistent with the implementation in org.metafacture.metamorph.api.helpers.AbstractSimpleStatelessFunction
: processedValue
is not emitted if it's null
, which is the default value in org.metafacture.metamorph.functions.Lookup
unless otherwise specified.
Can this issue be clarified - or closed if obsolete?
Are you sure that litA: dragon is actually emitted? That's exactly what the test [...] covers, isn't it?
See also this sample in the playground.
I think this can be closed.
At the moment
lookup
maps matching values and passes through values that do not match. While there is a way to set a default value for all not matching values it would be nice to use the lookup as optional filter too so that only mapped values will be passed on.At the moment:
Input
litA: cat, litA: dog, litA: dragon
Output:
litA: mammal, litA: mammal, litA: dragon
If used with the option filter.
litA: dragon
should be ignored.