Github user cestella commented on the issue:
https://github.com/apache/metron/pull/718
Ok, I think I see the point of confusion. Here's the issue; in every other
place where we use stellar (i.e. enrichments) assignment to null implies a
variable removal. In field transformations, assignment to null is noop. I'm
just trying to make them consistent. We could make both noop, but then we'd
remove the ability to have temporary variables in enrichment, which has proven
very useful. Also, if we keep the current functionality, the example above,
I'd argue, yields confusing results.
That being said, I think this is probably the WRONG behavior in both cases.
What I'd propose, instead, is support within stellar to be able to modify the
variables. I'd propose:
* `REMOVE('field')` would remove the field
* `^=` instead of `:=` would create a temporary variable so you would not
need to remember to remove. e.g. `foo ^= TO_UPPER('casey')` would not be
persisted to the message in either field transformations or enrichments.
I think the current functionality is a bit kludgey, but I think as a
stopgap we should at least make them do the same thing and I think removal is
the most sensible choice.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---