Spacetime: escapable field references #13479
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a proof-of-concept that is NOT meant to be merged.
When this PR proves that what it is attempting is possible, a new PR will be opened to replace it.
What does this PR do?
This PR attempts to find a path forward for
EventFactory#newEvent(Map)
when the provided payload contains as map whose individual keys aren't valid field references.Adjust the Treetop grammar to properly capture field references that contain escape sequencesEDIT: work carries forward the idea of using either percent-encoding or ampersand-encoding, which would be transparent to the treetop grammar.Create a newEDIT: the "old" behaviour was undefined and basically never worked. Either the field name was a valid FieldReference and we silently discarded the path, or the field name was not a valid FieldReference and we threw an error. The only case where it worked correctly was when a top-level field name was wrapped in square brackets.EventFactory
implementation or wrapper that emulates the "old" behaviour of treating the keys as field references, and allow it to be selected with a pipeline-level setting. This implementation should properly nest the keys with the field reference's path, and should raise an exception when encountering fields that are not valid.